summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/collect.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/collect.py')
-rw-r--r--tests/cloud_tests/collect.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cloud_tests/collect.py b/tests/cloud_tests/collect.py
index 33acbb1e..5ea88e50 100644
--- a/tests/cloud_tests/collect.py
+++ b/tests/cloud_tests/collect.py
@@ -24,6 +24,13 @@ def collect_script(instance, base_dir, script, script_name):
(out, err, exit) = instance.run_script(
script.encode(), rcs=False,
description='collect: {}'.format(script_name))
+ if err:
+ LOG.debug("collect script %s had stderr: %s", script_name, err)
+ if not isinstance(out, bytes):
+ raise util.PlatformError(
+ "Collection of '%s' returned type %s, expected bytes: %s" %
+ (script_name, type(out), out))
+
c_util.write_file(os.path.join(base_dir, script_name), out)