Commit 36a776e0 authored by Remi Perenon's avatar Remi Perenon

Debugging last merge (restoring install phase on MacOS build script, debugging windows test script)

parent 8e4940bf
Pipeline #3818 failed with stages
in 0 seconds
......@@ -42,4 +42,11 @@ if [ $status -ne 0 ]; then
exit $status
fi
/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE" "Failed to install MDANSE" "$NORMAL"
exit $status
fi
exit 0
\ No newline at end of file
......@@ -11,9 +11,12 @@ cd %testsPath%
set testsPath=%2\Tests\FunctionalTests\Jobs
cd %testsPath%
:: Remove actual Test files (if any) and the test_BuildJobTests.py file
del Test_*
%1\python.exe BuildJobTests.py
%1\python.exe %1\Scripts\nosetests --verbosity=3 %testsPath%\Test_*.py
del AllTests*
del Build*
%1\python.exe -m nose
exit %errorlevel%
\ No newline at end of file
......@@ -19,8 +19,8 @@ cmd /V:ON /E:ON /C "run_tests.bat" "${TARGET_DIR}" "${CI_PROJECT_DIR_WIN}"
# Exit now if unable to run tests
status=$?
if [ $status -ne 0 ]; then
echo "Failed to extract python"
echo "One or several unit tests failed"
exit $status
fi
exit 0
\ No newline at end of file
......@@ -50,13 +50,14 @@ class JobFileGenerator():
parameters = self.job.get_default_parameters()
test_string = test_string + ' parameters = {}\n'
for k, v in sorted(parameters.items()):
test_string = test_string + ' parameters[%r] = %r\n' % (k, v)
temp = 'parameters[%r] = %r\n' % (k, v)
test_string = test_string + ' ' + temp.replace('\\\\', '/')
test_string = test_string + ' job = REGISTRY[%r][%r]()\n' % ('job',self.job._type)
test_string = test_string + ' if "output_file" in parameters:\n'
test_string = test_string + ' output_path = parameters["output_file"][0]\n'
test_string = test_string + ' else:\n'
test_string = test_string + ' output_path = parameters["output_files"][0]\n'
test_string = test_string + ' reference_data_path = "' + self.reference_data_path + '"\n'
test_string = test_string + ' reference_data_path = "' + self.reference_data_path.replace('\\', '/') + '"\n'
# Launch the job in monoprocessor mode and copy output file
test_string = test_string + ' print "Launching job in monoprocessor mode"\n'
test_string = test_string + ' parameters["running_mode"] = ("monoprocessor",1)\n'
......@@ -73,11 +74,11 @@ class JobFileGenerator():
# Compare reference data with monoprocessor if reference data exists
if self.reference_data_file:
test_string = test_string + ' print "Comparing monoprocessor output with reference output"\n'
test_string = test_string + ' self.assertTrue(compare("' + self.reference_data_file + '", reference_data_path + "_mono" + ".nc"))\n\n'
test_string = test_string + ' self.assertTrue(compare("' + self.reference_data_file.replace('\\', '/') + '", reference_data_path + "_mono" + ".nc"))\n\n'
# Compare reference data with multiprocessor if reference data exists
if self.reference_data_file and self.multiprocessor:
test_string = test_string + ' print "Comparing multiprocessor output with reference output"\n'
test_string = test_string + ' self.assertTrue(compare("' + self.reference_data_file + '", reference_data_path + "_multi" + ".nc"))\n\n'
test_string = test_string + ' self.assertTrue(compare("' + self.reference_data_file.replace('\\', '/') + '", reference_data_path + "_multi" + ".nc"))\n\n'
# If no reference data but multiprocessor, compare mono and multiprocessor
elif self.multiprocessor:
test_string = test_string + ' print "Comparing monoprocessor output with multiprocessor output"\n'
......@@ -172,3 +173,4 @@ if __name__ == '__main__':
pass
else:
job_file_generator = JobFileGenerator(job)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment