Commit 834588cd authored by hugues.jerome's avatar hugues.jerome

* Add flag -o to overwrite existing reference files



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1346 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c6032e55
...@@ -33,11 +33,12 @@ usage () { ...@@ -33,11 +33,12 @@ usage () {
Options: Options:
--help |-h : This help --help |-h : This help
--tests |-t {<test_directories>}: Do the tests (testsuite directory) --tests |-t {<test_directories>}: Do the tests (testsuite directory)
--examples|-x {examples_directories}: Do the examples (examples directory) --examples |-x {examples_directories}: Do the examples (examples directory)
--runtimes|-r : Test the PolyORB-HI runtimes --runtimes |-r : Test the PolyORB-HI runtimes
--projects|-p : Test the AADL projects --projects |-p : Test the AADL projects
--all |-a : Test Ocarina, runtimes and projects --all |-a : Test Ocarina, runtimes and projects
--lcov |-l: Generate html output from gcov information --lcov |-l: Generate html output from gcov information
--overwrite|-o: Overwrite reference file
--clean |-c: Delete intermediate files --clean |-c: Delete intermediate files
EOF EOF
} }
...@@ -134,6 +135,7 @@ doexamples="false" # disabled for now ...@@ -134,6 +135,7 @@ doexamples="false" # disabled for now
doruntimes="false" doruntimes="false"
doprojects="false" doprojects="false"
doall="false" doall="false"
overwrite_output="false"
testfiles="" testfiles=""
examplefiles="" examplefiles=""
...@@ -143,6 +145,9 @@ if test $# != 0 ; then ...@@ -143,6 +145,9 @@ if test $# != 0 ; then
usage usage
exit 0 exit 0
;; ;;
--overwrite|-o)
overwrite_output="true"
;;
--all|-a) --all|-a)
doexamples="false" doexamples="false"
dotests="false" dotests="false"
...@@ -380,6 +385,14 @@ if test ${dotests} = "true" ; then ...@@ -380,6 +385,14 @@ if test ${dotests} = "true" ; then
${expected_output} \ ${expected_output} \
${actual_output} ${actual_output}
if test ${overwrite_output} = "true"; then
echo ${actual_output}
echo -------
echo ${expected_output}
echo cp ${actual_output} ${expected_output}
cp ${actual_output} ${expected_output}
fi
else else
failed ${entry} \ failed ${entry} \
"${ocarina} ${flags} ${version} \"`${path_conv} ${file}`\"" \ "${ocarina} ${flags} ${version} \"`${path_conv} ${file}`\"" \
......
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