diff --git a/.gitattributes b/.gitattributes index aefb4e8acf13dde302ebfb48e521e1146dce6a4f..50e68f8c3581c5c2aaafe40890eeb490b468d29c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -955,11 +955,13 @@ tools/cfar_configs/cfar_probIlr_structP1Canaries_strata.sh -text tools/cfar_configs/cfar_probNogX_phase1_zipr.sh -text tools/cfar_configs/cfar_probNogX_probBilr_zipr.sh -text tools/cfar_configs/cfar_probNogX_probSS_phase1_zipr.sh -text +tools/cfar_configs/cfar_probNogX_probSS_probSI_phase1_zipr.sh -text tools/cfar_configs/cfar_probNog_phase1_zipr.sh -text tools/cfar_configs/cfar_probNog_probBilr_zipr.sh -text tools/cfar_configs/cfar_probNog_probNol_probNoh_probNos_probBilr_probP1_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_probNog_probSS_phase1_zipr.sh -text tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh -text +tools/cfar_configs/cfar_probNog_probSS_probSI_phase1_zipr.sh -text tools/cfar_configs/cfar_probNoh_probIlr_probP1_probHeaprand_probNos_strata.sh -text tools/cfar_configs/cfar_probNoh_probNos_probBilr_probP1_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_probNol_probNoh_probIlr_probP1_probHeaprand_probNos_strata.sh -text @@ -988,17 +990,21 @@ tools/cfar_configs/cfar_structNoc_structP1FloatingCanaries_structNos_structNol_s tools/cfar_configs/cfar_structNoc_zipr.sh -text tools/cfar_configs/cfar_structNogOFX_structSS_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOFX_structSS_structDSX_structSI_phase1_zipr.sh -text +tools/cfar_configs/cfar_structNogOFX_structSS_structSI_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOF_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOF_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOF_structSS_probDS_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOF_structSS_structDS_phase1_zipr.sh -text +tools/cfar_configs/cfar_structNogOF_structSS_structSI_phase1_zipr.sh -text tools/cfar_configs/cfar_structNogOF_zipr.sh -text tools/cfar_configs/cfar_structNogX_phase1_zipr.sh -text +tools/cfar_configs/cfar_structNogX_structSS_structSI_phase1_zipr.sh -text tools/cfar_configs/cfar_structNog_phase1_zipr.sh -text tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_structNog_structNol_structNoh_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_structNog_structSS_phase1_zipr.sh -text +tools/cfar_configs/cfar_structNog_structSS_structSI_phase1_zipr.sh -text tools/cfar_configs/cfar_structNoh_probIlr_structP1Canaries_probHeaprand_structNos_strata.sh -text tools/cfar_configs/cfar_structNoh_structNos_structNoc_structP1Canaries_probHeaprand_zipr.sh -text tools/cfar_configs/cfar_structNol_structNoh_probIlr_structP1Canaries_probHeaprand_structNos_strata.sh -text diff --git a/tools/cfar.sh b/tools/cfar.sh index 701004a19041f338046250bfb7f3b3ab5bb077ba..35abd2b2c09905d50c7d719d572b9c1684ae9cd0 100755 --- a/tools/cfar.sh +++ b/tools/cfar.sh @@ -31,6 +31,7 @@ structured_nog=0 structured_nos=0 structured_ds=0 structured_stack_init=0 # auto stack initialize +assurance_case_evidence=1 # for gathering assurance case evidence config_name="unspecified" backend="strata" @@ -87,6 +88,9 @@ do echo "Unknown backend: ${cmd_line_options[$(expr $seq + 1)]}" exit 1 fi + # this option is for cfar. It should always be last so that all the log files for every step can be parsed + elif [ "$i" == "--gather_assurance" ]; then + assurance_case_evidence=1 else new_cmd_line_options+=("$i") fi @@ -179,6 +183,14 @@ do fi fi + # options to turn on assurance case evidence gathering + # This has to be here because per_variant options come last in the PS commandline + # And we need assurance case evidence to be LAST ps_analyze step executed + if [ "$assurance_case_evidence" -eq 1 ]; then + per_variant_options+=(--step assurance_case_evidence=on) + fi + + # add in options for output directory. per_variant_options+=(--tempdir "$baseoutdir/v${seq}/peasoup_executable_dir") mkdir -p "$baseoutdir/v${seq}" diff --git a/tools/cfar_configs/cfar_probNogX_probSS_phase1_zipr.sh b/tools/cfar_configs/cfar_probNogX_probSS_phase1_zipr.sh index 54a7da67d0ba9f1b6ffb90cfc4a3be60b98dfacf..482a35eb74a370ad8231c29a8fba7f572df61215 100755 --- a/tools/cfar_configs/cfar_probNogX_probSS_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_probNogX_probSS_phase1_zipr.sh @@ -1,4 +1,4 @@ #!/bin/bash -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step xor-globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step xor_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive diff --git a/tools/cfar_configs/cfar_probNogX_probSS_probSI_phase1_zipr.sh b/tools/cfar_configs/cfar_probNogX_probSS_probSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..7148a95a5bea57326af79db9e6aa19c16ac7911b --- /dev/null +++ b/tools/cfar_configs/cfar_probNogX_probSS_probSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step initialize_stack=on --step-option initialize_stack:"--initvalue $$" --step move_globals=on --step xor_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive diff --git a/tools/cfar_configs/cfar_probNog_probSS_phase1_zipr.sh b/tools/cfar_configs/cfar_probNog_probSS_phase1_zipr.sh index c07a2276902c73c9a22fbef2afe2cd037ffef2d3..29cb60a05c9d46c0cfa2f972f04a6a66870679a5 100755 --- a/tools/cfar_configs/cfar_probNog_probSS_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_probNog_probSS_phase1_zipr.sh @@ -1,4 +1,4 @@ #!/bin/bash -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step assurance_case_evidence=on +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp diff --git a/tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh b/tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh index 02631f02e936cf3d0667098f897dd0957363c8ff..1d2de7ad24eed7084931a2f6fbb84207185ca0ad 100755 --- a/tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_probNog_probSS_probDS_phase1_zipr.sh @@ -8,5 +8,5 @@ source $(dirname $0)/../ps_wrapper.source $0 # --imagename # -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step duck_season=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step assurance_case_evidence=on +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step duck_season=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp diff --git a/tools/cfar_configs/cfar_probNog_probSS_probSI_phase1_zipr.sh b/tools/cfar_configs/cfar_probNog_probSS_probSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..b2f3005f3413cb5e73c8b96d1e1b996a0f49c199 --- /dev/null +++ b/tools/cfar_configs/cfar_probNog_probSS_probSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step initialize_stack=on --step-option initialize_stack:"--initvalue $$" --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive diff --git a/tools/cfar_configs/cfar_structNogOFX_structSS_structDSX_structSI_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogOFX_structSS_structDSX_structSI_phase1_zipr.sh index 6e8868d6fb9d16c0b5e5a3201d01cad9c0ad8ab5..786d3fa06831b4dd4adf98f49834ed588af687e9 100755 --- a/tools/cfar_configs/cfar_structNogOFX_structSS_structDSX_structSI_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_structNogOFX_structSS_structDSX_structSI_phase1_zipr.sh @@ -2,5 +2,6 @@ source $(dirname $0)/../ps_wrapper.source $0 -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step duck_season=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step xor_globals=on --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option duck_season:--xor +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step duck_season=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step xor_globals=on --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive --step-option duck_season:--xor + diff --git a/tools/cfar_configs/cfar_structNogOFX_structSS_structSI_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogOFX_structSS_structSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..429247d2fe4e4b2a60ea7cf8de1026da3cbf43cd --- /dev/null +++ b/tools/cfar_configs/cfar_structNogOFX_structSS_structSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step xor_globals=on --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive + diff --git a/tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh index 25282b039dadb04a1325b8329b4270401e532e7d..4b2fa910b5788d0add9a66e77830c2e3658c92af 100755 --- a/tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_structNogOF_structSS_phase1_zipr.sh @@ -2,5 +2,5 @@ source $(dirname $0)/../ps_wrapper.source $0 -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step assurance_case_evidence=on +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp diff --git a/tools/cfar_configs/cfar_structNogOF_structSS_structDS_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogOF_structSS_structDS_phase1_zipr.sh index a27d3c6ac91b6f4eea932b9187d20dd2bf6cd3eb..74063424b8062d02ea0cc878c1641fc6166c398d 100755 --- a/tools/cfar_configs/cfar_structNogOF_structSS_structDS_phase1_zipr.sh +++ b/tools/cfar_configs/cfar_structNogOF_structSS_structDS_phase1_zipr.sh @@ -2,5 +2,5 @@ source $(dirname $0)/../ps_wrapper.source $0 -$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step duck_season=on --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step assurance_case_evidence=on +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step duck_season=on --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp diff --git a/tools/cfar_configs/cfar_structNogOF_structSS_structSI_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogOF_structSS_structSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..f51bbd30c7e91b25091b72b7e6d997a1b81501ad --- /dev/null +++ b/tools/cfar_configs/cfar_structNogOF_structSS_structSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true --large_only:overflow_protection true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive + diff --git a/tools/cfar_configs/cfar_structNogX_structSS_structSI_phase1_zipr.sh b/tools/cfar_configs/cfar_structNogX_structSS_structSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..e7c71de01f3241e3e060b083f185195a0c7c2847 --- /dev/null +++ b/tools/cfar_configs/cfar_structNogX_structSS_structSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step xor_globals=on --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive + diff --git a/tools/cfar_configs/cfar_structNog_structSS_structSI_phase1_zipr.sh b/tools/cfar_configs/cfar_structNog_structSS_structSI_phase1_zipr.sh new file mode 100755 index 0000000000000000000000000000000000000000..bec12a9f1f15966143690fce813b807c8e60cd6e --- /dev/null +++ b/tools/cfar_configs/cfar_structNog_structSS_structSI_phase1_zipr.sh @@ -0,0 +1,6 @@ +#!/bin/bash +source $(dirname $0)/../ps_wrapper.source $0 + + +$PEASOUP_HOME/tools/cfar.sh "$@" --backend zipr --step diehard=on --step-option zipr:"--zipr:seed $$" --structured_noc --structured_nos --step-option zipr:"--large_only:on true" --structured_p1_canaries --step p1transform=on --step initialize_stack=on --structured_stack_init --structured_ds --step non_overlapping_stack=on --config_name $(basename $0 .sh|sed "s/cfar_//") --step move_globals=on --step set_interpreter=on --step-option set_interpreter:"--interp /target_apps/ld-nol.so" --structured_nog --step-option zipr:"--large_only:nog_on true" --step noh=on --step nol=on --step stack_stamp=on --structured_stack_stamp --step-option move_globals:-d --step-option move_globals:.interp --step-option move_globals:--aggressive + diff --git a/tools/generate_mvee_package.sh b/tools/generate_mvee_package.sh index 83622a0c3885ea387cfde84b017762fa97fe3701..2192b53d48a487a21311624268e82b5ef36df801 100755 --- a/tools/generate_mvee_package.sh +++ b/tools/generate_mvee_package.sh @@ -8,13 +8,14 @@ usage() echo " Usage: - generate_mvee_config.sh + generate_mvee_package.sh [(--include-cr|--noinclude-cr)] [(--diehard|--nodiehard)] [(--libtwitcher|--nolibtwitcher)] [(--enablenoh|--disablenoh)] [(--enablenol|--disablenol)] + [(--enable-assurance|--disable-assurance)] --indir <path_to_variants> --outdir <path_to_variants> [--args <arguments string in json format> ] @@ -39,6 +40,7 @@ check_opts() use_libtwitcher="--nolibtwitcher" use_noh="--disablenoh" use_nol="--disablenol" + use_assurance="--disable-assurance" use_includecr="--noinclude-cr" mainexe_opt="" # look in target_apps and find exactly one thing. verbose=0 @@ -58,6 +60,8 @@ check_opts() --long disablenoh --long enablenol --long disablenol + --long enable-assurance + --long disable-assurance --long include-cr --long noinclude-cr --long indir: @@ -77,7 +81,7 @@ check_opts() if [ `uname -s` = "SunOS" ]; then TEMP=`getopt $short_opts "$@"` else - TEMP=`getopt -o $short_opts $long_opts -n 'generate_mvee_config.sh' -- "$@"` + TEMP=`getopt -o $short_opts $long_opts -n 'generate_mvee_package.sh' -- "$@"` fi # error check # @@ -152,6 +156,10 @@ check_opts() use_nol="$1" shift 1 ;; + --enable-assurance|--disable-assurance) + use_assurance="$1" + shift 1 + ;; --) shift break @@ -192,6 +200,7 @@ check_opts() echo "Setting include-cr = $use_includecr" echo "Setting noh = $use_noh" echo "Setting nol = $use_nol" + echo "Setting assurance = $use_assurance" fi server=${server} # uppercase the server setting. @@ -564,7 +573,10 @@ finalize_json() mkdir -p $outdir mkdir $outdir/global mkdir $outdir/marshaling - mkdir $outdir/assurance + # only create assurance directory if gathering assurance evidence + if [ "x"$use_assurance = "x--enable-assurance" ]; then + mkdir $outdir/assurance + fi # copy jar, python, and bash scripts into package. cp $CFAR_EMT_PLUGINS/*.jar $outdir/marshaling/ @@ -716,11 +728,13 @@ finalize_json() # new_variant_dir_ts="/target_apps/vs-$vs/variant-$seq" copy_stuff $full_exe_dir/peasoup_executable_dir $new_variant_dir/bin/peasoup_executable_dir $main_exe $new_variant_dir_ts/bin/peasoup_executable_dir 1 - # copy assurance evidence - copy_assurance_evidence $full_exe_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_variant-${seq}_evidence.txt $main_exe 1 $config "vs-${vs}_variant-${seq}" + if [ "x"$use_assurance = "x--enable-assurance" ]; then + # copy assurance evidence + copy_assurance_evidence $full_exe_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_variant-${seq}_evidence.txt $main_exe 1 $config "vs-${vs}_variant-${seq}" - # gather aggregate assurance evidence - gather_aggregate_assurance_evidence $full_exe_dir/peasoup_executable_dir/logs/assurance_case_evidence.log "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" $seq $main_exe + # gather aggregate assurance evidence + gather_aggregate_assurance_evidence $full_exe_dir/peasoup_executable_dir/logs/assurance_case_evidence.log "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" $seq $main_exe + fi # echo "exe_dir=$exe_dir" @@ -753,11 +767,13 @@ finalize_json() line=", "$'\n\t\t\t'" \"/usr/lib/$lib=$new_variant_dir_ts/lib/$lib\" " copy_stuff $indir/$lib_dir/peasoup_executable_dir $new_variant_dir/lib/$lib-peasoup_executable_dir $lib $new_variant_dir_ts/lib/$lib-peasoup_executable_dir 0 fi - # copy assurance evidence - copy_assurance_evidence $indir/$lib_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_variant-${seq}_evidence.txt $lib 0 $config "vs-${vs}_variant-${seq}" - # gather aggregate assurance evidence - gather_aggregate_assurance_evidence $indir/$lib_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt "$seq" $lib + if [ "x"$use_assurance = "x--enable-assurance" ]; then + # copy assurance evidence + copy_assurance_evidence $indir/$lib_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_variant-${seq}_evidence.txt $lib 0 $config "vs-${vs}_variant-${seq}" + # gather aggregate assurance evidence + gather_aggregate_assurance_evidence $indir/$lib_dir/peasoup_executable_dir/logs/assurance_case_evidence.log $outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt "$seq" $lib + fi variant_config_contents="${variant_config_contents//,<<LIBS>>/$line,<<LIBS>>}" done @@ -819,11 +835,14 @@ finalize_json() done - # parse the aggregated assurance case evidence for the variant set - parse_aggregate_assurance_file "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" "$outdir/assurance/vs-${vs}_aggregate_evidence.txt" "vs-${vs}" + if [ "x"$use_assurance = "x--enable-assurance" ]; then - # remove the intermediate file - rm -f "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" + # parse the aggregated assurance case evidence for the variant set + parse_aggregate_assurance_file "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" "$outdir/assurance/vs-${vs}_aggregate_evidence.txt" "vs-${vs}" + + # remove the intermediate file + rm -f "$outdir/assurance/vs-${vs}_aggregate_evidence.tmp.txt" + fi json_contents="${json_contents//<<VARIANT_SETS>>/$vs_json_contents,<<VARIANT_SETS>>}"