=== modified file 'lava_dispatcher/actions/lava_test_shell.py'
@@ -441,9 +441,8 @@
self._sw_sources.append(info)
def copy_test(self, hostdir, targetdir):
+ shutil.copytree(self.repo, hostdir, symlinks=True)
URLTestDefinition.copy_test(self, hostdir, targetdir)
- for filepath in glob(os.path.join(self.repo, '*')):
- shutil.copy2(filepath, hostdir)
logging.info('copied all test files')
@@ -544,6 +543,7 @@
def _mk_runner_dirs(self, mntdir):
utils.ensure_directory('%s/bin' % mntdir)
utils.ensure_directory_empty('%s/tests' % mntdir)
+ utils.ensure_directory_empty('%s/results' % mntdir)
def _configure_target(self, target, testdef_urls, testdef_repos):
ldir = target.deployment_data['lava_test_dir']
=== modified file 'lava_dispatcher/lava_test_shell.py'
@@ -125,7 +125,7 @@
for filename, filepath in _directory_names_and_paths(dir, ignore_missing=True):
if filename.endswith('.mimetype'):
continue
- mime_type = _read_content(filepath + '.mimetype', ignore_missing=True)
+ mime_type = _read_content(filepath + '.mimetype', ignore_missing=True).strip()
if not mime_type:
mime_type = mimetypes.guess_type(filepath)[0]
if mime_type is None:
=== modified file 'lava_test_shell/lava-test-case'
@@ -17,11 +17,11 @@
fi
if [ "$1" = "--shell" ]; then
shift
- echo "<LAVA_SIGNAL_STARTTC $TEST_CASE_ID>"
+ echo "<LAVA_SIGNAL_STARTTC $TEST_CASE_ID>" > /dev/console
read -t 600 < $ACK_FIFO
$*
rc=$?
- echo "<LAVA_SIGNAL_ENDTC $TEST_CASE_ID>"
+ echo "<LAVA_SIGNAL_ENDTC $TEST_CASE_ID>" > /dev/console
read -t 600 < $ACK_FIFO
if [ $rc -eq 0 ]; then
RESULT=pass
@@ -71,4 +71,5 @@
if [ -n "${MEASUREMENT+x}" ]; then
echo $MEASUREMENT > $result_dir/measurement
-fi
\ No newline at end of file
+fi
+[ -n "${rc+x}" ] && exit $rc
=== modified file 'lava_test_shell/lava-test-runner-android'
@@ -101,7 +101,11 @@
cp ${line}/testdef.yaml ${odir}/
cp ${line}/uuid ${odir}/analyzer_assigned_uuid
cp ${line}/run.sh ${odir}/attachments/
- [ -f ${line}/install.sh ] && cp ${line}/install.sh ${odir}/attachments/
+ echo 'text/plain' > ${odir}/attachments/run.sh.mimetype
+ if [ -f ${line}/install.sh ]; then
+ cp ${line}/install.sh ${odir}/attachments/
+ echo 'text/plain' > ${odir}/attachments/install.sh.mimetype
+ fi
lava-test-shell --output_dir ${odir} /system/bin/sh -e "${line}/run.sh"
echo "${PREFIX} ${test} exited with: `cat ${odir}/return_code`"
done < ${WORKFILE}
=== modified file 'lava_test_shell/lava-test-runner-ubuntu'
@@ -84,7 +84,11 @@
cp ${line}/uuid ${odir}/analyzer_assigned_uuid
cp ${line}/testdef.yaml ${odir}/
cp ${line}/run.sh ${odir}/attachments/
- [ -f ${line}/install.sh ] && cp ${line}/install.sh ${odir}/attachments/
+ echo 'text/plain' > ${odir}/attachments/run.sh.mimetype
+ if [ -f ${line}/install.sh ]; then
+ cp ${line}/install.sh ${odir}/attachments/
+ echo 'text/plain' > ${odir}/attachments/install.sh.mimetype
+ fi
# run.sh includes a "read -t <timeout>" which isn't supported by dash
# so be sure to use bash
lava-test-shell --output_dir ${odir} /bin/bash -e "${line}/run.sh"