aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-11-16 20:11:35 +0000
committerRob Austein <sra@hactrn.net>2007-11-16 20:11:35 +0000
commita768683fbb635e8800779694e27b668802136261 (patch)
tree835bcc9b579ebf762c0e6b53a78de6af1e48345f
parent8bde316d2ce3fd368f35ba533e094c1651006956 (diff)
Extend "make test"
svn path=/scripts/Makefile; revision=1303
-rw-r--r--scripts/Makefile5
-rw-r--r--scripts/biz-certs/Bob-CA.srl2
-rw-r--r--scripts/testroot.sh26
3 files changed, 29 insertions, 4 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 11039603..6c82945e 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -16,7 +16,7 @@ all:: up-down-schema.rng
up-down-schema.rng: up-down-schema.rnc
trang up-down-schema.rnc up-down-schema.rng
-test: all
+test:: all
python xml-parse-test.py
dont-run-trang:
@@ -49,3 +49,6 @@ all:: rpki/relaxng.py
rpki/relaxng.py: left-right-schema.rng up-down-schema.rng make-relaxng.py
python make-relaxng.py >$@.tmp
mv $@.tmp $@
+
+test::
+ sh testroot.sh run
diff --git a/scripts/biz-certs/Bob-CA.srl b/scripts/biz-certs/Bob-CA.srl
index 2c61affc..0e9c9092 100644
--- a/scripts/biz-certs/Bob-CA.srl
+++ b/scripts/biz-certs/Bob-CA.srl
@@ -1 +1 @@
-90801F1ED19454B2
+90801F1ED19454B6
diff --git a/scripts/testroot.sh b/scripts/testroot.sh
index 52ee1425..ebc61d95 100644
--- a/scripts/testroot.sh
+++ b/scripts/testroot.sh
@@ -29,8 +29,7 @@ mysql -u rpki -p`awk '$1 == "sql-password" {print $3}' rpkid.conf` rpki <../docs
# Start rpkid so we can configure it, make sure we shut it down on exit
-python rpkid.py &
-rpkid=$!
+python rpkid.py & rpkid=$!
trap "kill $rpkid" 0
# Create a self instance
@@ -64,3 +63,26 @@ python irbe-cli.py child --self_id 1 --action create --bsc_id 1 --cms_ta biz-cer
# Need to link irdb to created child. For now, just do this manually in MySQL CLI:
#
# UPDATE registrant SET rpki_self_id = 1, rpki_child_id = 1 WHERE subject_name = "Epilogue Technology Corporation"
+
+if test "$1" = "run"
+then
+
+ python testroot.py & testroot=$!
+ python irdb.py & irdb=$!
+ trap "kill $rpkid $irdb $testroot" 0
+
+ python http-client.py
+ python testpoke.py -r list
+ python testpoke.py -r issue
+
+ python http-client.py
+ python testpoke.py -r list
+ python testpoke.py -r issue
+
+ python testpoke.py -r issue |
+ qh |
+ sed -n '/^(certificate/,/^)certificate/s/^-//p' |
+ mimencode -u |
+ $openssl x509 -noout -inform DER -text
+
+fi