Mercurial > hg > monetdb-perl
annotate runtests.sh @ 29:a8bdee6b0128
Add two shell scripts for use in GitHub workflow
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Thu, 17 Dec 2020 11:26:56 +0100 (2020-12-17) |
parents | |
children | c436b5131196 |
rev | line source |
---|---|
29
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
1 #!/bin/bash |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
2 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
3 DBPATH="$PWD"/DB |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
4 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
5 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
6 set -e -x |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
7 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
8 # Start the mserver |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
9 rm -rf "$DBPATH" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
10 mkdir "$DBPATH" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
11 mserver5 --dbpath="$DBPATH/perltestdb" >"$DBPATH/mserver5.log" 2>&1 & |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
12 pid=$! |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
13 trap "kill -9 $pid 2>/dev/null" EXIT |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
14 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
15 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
16 # After a few seconds, check if it's still running |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
17 sleep 3 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
18 if ! kill -0 $pid 2>/dev/null; then |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
19 echo "MSERVER STOPPED EARLY" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
20 cat "$DBPATH/mserver5.log" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
21 exit 1 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
22 fi |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
23 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
24 export DBI_DSN=dbi:monetdb:database=perltestdb |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
25 export PERL5LIB=$PWD/MonetDB-CLI-MapiPP:$PWD/MonetDB-CLI:$PWD |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
26 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
27 make -C DBD test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
28 : |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
29 make -C MonetDB-CLI/MonetDB test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
30 : |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
31 make -C MonetDB-CLI-MapiPP/MonetDB/CLI test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
32 : |