From 834588cd31c623e0fae3f2ba677199b60a3d3ceb Mon Sep 17 00:00:00 2001 From: "hugues.jerome" Date: Mon, 23 Aug 2010 11:23:48 +0000 Subject: [PATCH] * 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 --- autotest.sh | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/autotest.sh b/autotest.sh index a0b5b1be..60fe5f90 100755 --- a/autotest.sh +++ b/autotest.sh @@ -31,14 +31,15 @@ usage () { Usage : $0 [options] Options: - --help |-h : This help - --tests |-t {}: Do the tests (testsuite directory) - --examples|-x {examples_directories}: Do the examples (examples directory) - --runtimes|-r : Test the PolyORB-HI runtimes - --projects|-p : Test the AADL projects - --all |-a : Test Ocarina, runtimes and projects - --lcov |-l: Generate html output from gcov information - --clean |-c: Delete intermediate files + --help |-h : This help + --tests |-t {}: Do the tests (testsuite directory) + --examples |-x {examples_directories}: Do the examples (examples directory) + --runtimes |-r : Test the PolyORB-HI runtimes + --projects |-p : Test the AADL projects + --all |-a : Test Ocarina, runtimes and projects + --lcov |-l: Generate html output from gcov information + --overwrite|-o: Overwrite reference file + --clean |-c: Delete intermediate files EOF } @@ -134,6 +135,7 @@ doexamples="false" # disabled for now doruntimes="false" doprojects="false" doall="false" +overwrite_output="false" testfiles="" examplefiles="" @@ -143,6 +145,9 @@ if test $# != 0 ; then usage exit 0 ;; + --overwrite|-o) + overwrite_output="true" + ;; --all|-a) doexamples="false" dotests="false" @@ -380,6 +385,14 @@ if test ${dotests} = "true" ; then ${expected_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 failed ${entry} \ "${ocarina} ${flags} ${version} \"`${path_conv} ${file}`\"" \ -- GitLab