Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#!/bin/bash

#1st arg: number of tests
#2nd arg: "random"/"list"  

#Example 1: ./multi_seed.sh 3 random  => Generates 3 tests with random values in range [1;10000]
#Example 2: ./multi_seed.sh 5 list    => Generates 2 tests with values in list seed_list 

#To generate a CSV report launch the following command:
#Example: python compare_sta.py switch_NG-MEDIUM_ Routed worstcase => Generates a CSV report for all folders containing "switch_NG-MEDIUM_" parsing STA files generated at Routed step in worstcase conditions

nxpython_path=/home/groups/soft/nxdesignsuite/integration/nxmap-dbg/lastdevversion/lastdevbuild/bin/nxpython

seed_list="13 19"

for (( i=0; i< $1; i++)) 
do
    if [[ $2 == "random" ]]
    then
        seed=$(( RANDOM % 10000 ))
        $nxpython_path nxmapnxpython_script.py --seed $seed --suffix $seed
    elif [[ $2 == "list" ]]
    then
        seed_list_split=($seed_list)
        seed=${seed_list_split[$i]}
        $nxpython_path nxmap_script.py --seed $seed --suffix $seed
    else
        echo "Unrecognized mode $2. It must be random or list"
    fi 
done

...