@@ -69,7 +69,7 @@ echo "Found $NPROCS processors"
6969date
7070
7171# Try to ensure we're using the real g++ and clang++ versions we want
72- mkdir bin
72+ mkdir -p bin
7373
7474export PATH=` pwd` /bin:$PATH
7575echo " PATH is $PATH "
@@ -80,19 +80,19 @@ if test $CXX = 'clang++'; then
8080 # Use CLANG_VERSION environment variable if set, otherwise default to 12
8181 CLANG_VER=${CLANG_VERSION:- 12}
8282 which clang-${CLANG_VER}
83- ln -s ` which clang-${CLANG_VER} ` bin/clang
83+ ln -sf ` which clang-${CLANG_VER} ` bin/clang
8484 which clang++-${CLANG_VER}
85- ln -s ` which clang++-${CLANG_VER} ` bin/clang++
85+ ln -sf ` which clang++-${CLANG_VER} ` bin/clang++
8686 which llvm-symbolizer-${CLANG_VER}
87- ln -s ` which llvm-symbolizer-${CLANG_VER} ` bin/llvm-symbolizer
87+ ln -sf ` which llvm-symbolizer-${CLANG_VER} ` bin/llvm-symbolizer
8888 clang -v
8989 llvm-symbolizer --version || true
9090elif test $CXX = ' g++' ; then
9191 RUN_PARTITIONS=$( seq $NPROCS $(( 2 * NPROCS- 1 )) )
9292 which gcc-10
93- ln -s ` which gcc-10` bin/gcc
93+ ln -sf ` which gcc-10` bin/gcc
9494 which g++-10
95- ln -s ` which g++-10` bin/g++
95+ ln -sf ` which g++-10` bin/g++
9696 which g++
9797 g++ -v
9898fi
@@ -165,13 +165,15 @@ if [ $WITH_TESTS -eq 0 ] ; then
165165fi
166166
167167if [ $TEMP_POSTGRES -eq 0 ] ; then
168- # Create postgres databases
168+ # Create postgres databases (drop first if they exist to ensure clean state)
169169 export PGUSER=postgres
170+ psql -c " drop database if exists test;" 2> /dev/null || true
170171 psql -c " create database test;"
171172 # we run NPROCS jobs in parallel
172173 for j in $( seq 0 $(( NPROCS- 1 )) ) ; do
173174 base_instance=$(( j* 50 ))
174175 for i in $( seq $base_instance $(( base_instance+ 15 )) ) ; do
176+ psql -c " drop database if exists test$i ;" 2> /dev/null || true
175177 psql -c " create database test$i ;"
176178 done
177179 done
0 commit comments