nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

test.sh (625B)


      1 #!/usr/bin/env sh
      2 
      3 set -e
      4 
      5 HERE=`dirname $0`
      6 cd $HERE/..
      7 ROOT=`pwd`
      8 
      9 DBGDIR=$ROOT/build/Debug
     10 RELDIR=$ROOT/build/Release
     11 
     12 if [ "$1" = "--debug" ]; then
     13     DEBUG=$1
     14     echo "running debug build"
     15     shift
     16 fi
     17 
     18 if [ "$1" != "--no-clean" ]; then
     19     echo "cleaning build before tests ..."
     20     $ROOT/scripts/cleanall.sh
     21 else
     22     shift
     23 fi
     24 
     25 echo "building before tests ..."
     26 $ROOT/scripts/build.sh $DEBUG
     27 
     28 echo "running test in debug build ..."
     29 cd $DBGDIR && ctest $ROOT
     30 
     31 if [ "$DEBUG" != "--debug" ]; then
     32 echo "running test in release build ..."
     33 cd $RELDIR && ctest $ROOT
     34 echo "TEST PASSED"
     35 else
     36     echo "DEBUG TEST PASSED"
     37 fi
     38