diff --git a/cicd_testing/do-build.sh b/cicd_testing/do-build.sh index 64af6b87bfb4f840771b4cd7ac79637cc8f3e2e0..40b0ddae9808eeb728dcf5342849a3e2000faf89 100755 --- a/cicd_testing/do-build.sh +++ b/cicd_testing/do-build.sh @@ -19,14 +19,14 @@ main() local orig_dir=$(pwd) # puts peasoup_umbrella (and all submodules) in CICD_MODULE_WORK_DIR - cicd_setup_module_dependency allnp/peasoup_umbrella.git stars_umbrella + cicd_setup_module_dependency allnp/peasoup_umbrella.git cicd_stars_umbrella - # puts the version of zipr to test in stars_umbrella/SMPStaticAnalyzer. - cicd_put_module_in_tree stars_umbrella/SMPStaticAnalyzer + # puts the version of zipr to test in cicd_stars_umbrella/SMPStaticAnalyzer. + cicd_put_module_in_tree cicd_stars_umbrella/SMPStaticAnalyzer - # Build peasoup_umbrella as stars_umbrella - cd $CICD_MODULE_WORK_DIR/stars_umbrella + # Build peasoup_umbrella as cicd_stars_umbrella + cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella source set_env_vars sudo ./get-peasoup-packages.sh all ./build-all.sh diff --git a/cicd_testing/do-clean.sh b/cicd_testing/do-clean.sh index 409081b3fb57d525654283a1bcd864d47107d8c8..ad1db02c6e7e7e177f557b41682f0e49b0e1a160 100755 --- a/cicd_testing/do-clean.sh +++ b/cicd_testing/do-clean.sh @@ -14,7 +14,7 @@ main() if [[ $CICD_NIGHTLY == 1 ]] ; then - rm -rf $CICD_MODULE_WORK_DIR/stars_umbrella + rm -rf $CICD_MODULE_WORK_DIR/cicd_stars_umbrella fi } diff --git a/cicd_testing/starstest.sh b/cicd_testing/starstest.sh index cf65a8bdfc1a00727d1006608da9b1dbeeeaa8f9..f1f3d786135e94f3f2e39c825dcf88b526992836 100755 --- a/cicd_testing/starstest.sh +++ b/cicd_testing/starstest.sh @@ -1,58 +1,64 @@ #!/bin/bash # Usage: -function validate { - if grep "FROMIB COMPLETE 20 SWITCHTABLE" $1.STARSxrefs > /dev/null; then - if grep "FROMIB COMPLETE 1 RETURNTARGET" $1.STARSxrefs > /dev/null; then - if tail $1.infoannot | grep "SUCCESS ANALYSISCOMPLETED" > /dev/null; then - echo "STARS success" - exitstatus=0 - else - echo "Failed to find SUCCESS ANALYSISCOMPLETED annotation" - exitstatus=1 - fi - else - echo "Failed to find any COMPLETE RETURNTARGET xref annotations" - exitstatus=2 - fi - else - echo "Failed to find COMPLETE 20 SWITCHTABLE xref annotation" - exitstatus=3 - fi - return $exitstatus +function validate +{ + if ! grep "FROMIB COMPLETE 20 SWITCHTABLE" $1.STARSxrefs > /dev/null; then + echo "Failed to find COMPLETE 20 SWITCHTABLE xref annotation" + exit 3 + fi + if ! grep "FROMIB COMPLETE 1 RETURNTARGET" $1.STARSxrefs > /dev/null; then + echo "Failed to find any COMPLETE RETURNTARGET xref annotations" + exit 2 + fi + if ! tail $1.infoannot | grep "SUCCESS ANALYSISCOMPLETED" > /dev/null; then + echo "Failed to find SUCCESS ANALYSISCOMPLETED annotation" + exit 1 + fi + + echo "STARS success" + return 0 } -function test { +function test() +{ . $SMPSA_HOME/SMP-fullanalyze64-ida7.sh $1 validate $1 } # Pass in optimization level string, e.g. O0, Og, or O3 -function build { +function build() +{ rm -f starstest_$1.exe gcc -m64 -$1 -o starstest_$1.exe $SMPSA_HOME/tests/starstest.c } # Pass in optimization level string, e.g. O0, Og, or O3 -function build_and_test { +function build_and_test() +{ build $1 test starstest_$1.exe } -#!/bin/bash -set -e -set -x +function main() +{ + set -e + set -x -cd $CICD_MODULE_WORK_DIR/stars_umbrella -source set_env_vars -mkdir -p /tmp/stars_test -cd /tmp/stars_test + cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella + source set_env_vars + mkdir -p /tmp/stars_test + cd /tmp/stars_test -# Build and test each of the optimization levels -O0, -Og, and -O3. -if build_and_test O0 ; then - if build_and_test Og ; then - build_and_test O3 - fi -fi + # Build and test each of the optimization levels -O0, -Og, and -O3. + if build_and_test O0 ; then + if build_and_test Og ; then + build_and_test O3 + fi + fi + return 0 + +} +main "$@" diff --git a/cicd_testing/xform-ls.sh b/cicd_testing/xform-ls.sh index 18de145e50e9bfeace2f6d1736c5e97c8f9eb9f5..2ec8d11f30aa1d2a71acad0b06bf82b008886f77 100755 --- a/cicd_testing/xform-ls.sh +++ b/cicd_testing/xform-ls.sh @@ -2,7 +2,7 @@ set -e set -x -cd $CICD_MODULE_WORK_DIR/stars_umbrella +cd $CICD_MODULE_WORK_DIR/cicd_stars_umbrella source set_env_vars mkdir -p /tmp/stars_test cd /tmp/stars_test diff --git a/libehp b/libehp index ce22715110a7380b3b5a8b684b92e1ea32403734..1896c4f56227908fbe56569fcaf159799609d069 160000 --- a/libehp +++ b/libehp @@ -1 +1 @@ -Subproject commit ce22715110a7380b3b5a8b684b92e1ea32403734 +Subproject commit 1896c4f56227908fbe56569fcaf159799609d069