mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Merge pull request #3410 from mpg/make-coverage-script-deterministic
Make basic-build-test.sh more deterministic
This commit is contained in:
		
						commit
						c96d4e2739
					
				@ -135,6 +135,14 @@ pre_initialize_variables () {
 | 
			
		||||
    FORCE=0
 | 
			
		||||
    KEEP_GOING=0
 | 
			
		||||
 | 
			
		||||
    # Seed value used with the --release-test option.
 | 
			
		||||
    #
 | 
			
		||||
    # See also RELEASE_SEED in basic-build-test.sh. Debugging is easier if
 | 
			
		||||
    # both values are kept in sync. If you change the value here because it
 | 
			
		||||
    # breaks some tests, you'll definitely want to change it in
 | 
			
		||||
    # basic-build-test.sh as well.
 | 
			
		||||
    RELEASE_SEED=1
 | 
			
		||||
 | 
			
		||||
    : ${MBEDTLS_TEST_OUTCOME_FILE=}
 | 
			
		||||
    : ${MBEDTLS_TEST_PLATFORM="$(uname -s | tr -c \\n0-9A-Za-z _)-$(uname -m | tr -c \\n0-9A-Za-z _)"}
 | 
			
		||||
    export MBEDTLS_TEST_OUTCOME_FILE
 | 
			
		||||
@ -232,7 +240,7 @@ General options:
 | 
			
		||||
     --outcome-file=<path>  File where test outcomes are written (not done if
 | 
			
		||||
                            empty; default: \$MBEDTLS_TEST_OUTCOME_FILE).
 | 
			
		||||
     --random-seed      Use a random seed value for randomized tests (default).
 | 
			
		||||
  -r|--release-test     Run this script in release mode. This fixes the seed value to 1.
 | 
			
		||||
  -r|--release-test     Run this script in release mode. This fixes the seed value to ${RELEASE_SEED}.
 | 
			
		||||
  -s|--seed             Integer seed value to use for this test run.
 | 
			
		||||
 | 
			
		||||
Tool path options:
 | 
			
		||||
@ -382,7 +390,7 @@ pre_parse_command_line () {
 | 
			
		||||
            --outcome-file) shift; MBEDTLS_TEST_OUTCOME_FILE="$1";;
 | 
			
		||||
            --out-of-source-dir) shift; OUT_OF_SOURCE_DIR="$1";;
 | 
			
		||||
            --random-seed) unset SEED;;
 | 
			
		||||
            --release-test|-r) SEED=1;;
 | 
			
		||||
            --release-test|-r) SEED=$RELEASE_SEED;;
 | 
			
		||||
            --seed|-s) shift; SEED="$1";;
 | 
			
		||||
            -*)
 | 
			
		||||
                echo >&2 "Unknown option: $1"
 | 
			
		||||
 | 
			
		||||
@ -56,6 +56,14 @@ fi
 | 
			
		||||
: ${GNUTLS_LEGACY_CLI:="$GNUTLS_CLI"}
 | 
			
		||||
: ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"}
 | 
			
		||||
 | 
			
		||||
# Used to make ssl-opt.sh deterministic.
 | 
			
		||||
#
 | 
			
		||||
# See also RELEASE_SEED in all.sh. Debugging is easier if both values are kept
 | 
			
		||||
# in sync. If you change the value here because it breaks some tests, you'll
 | 
			
		||||
# definitely want to change it in all.sh as well.
 | 
			
		||||
: ${SEED:=1}
 | 
			
		||||
export SEED
 | 
			
		||||
 | 
			
		||||
# To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh
 | 
			
		||||
# we just export the variables they require
 | 
			
		||||
export OPENSSL_CMD="$OPENSSL"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user