From a6b98fac836d7acb755e114529e9bd3fe66b9c12 Mon Sep 17 00:00:00 2001 From: Steve McMahon Date: Sat, 7 Jul 2018 15:52:11 -0700 Subject: [PATCH] Add nr option to small test --- tests/small.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/small.txt b/tests/small.txt index 84a4f43..d8169ca 100644 --- a/tests/small.txt +++ b/tests/small.txt @@ -40,14 +40,17 @@ Vagrant provision -- unless contraindicated. Reboot the box. We only care about what survives a restart. - >>> print >> sys.stderr, "Poweroff %s" % box - >>> p = subprocess.call('vagrant ssh %s -c "sudo poweroff"' % box, shell=True) + >>> if skip_restart: + ... print >> sys.stderr, "Skipping restart" + ... else: + ... print >> sys.stderr, "Poweroff %s" % box + ... p = subprocess.call('vagrant ssh %s -c "sudo poweroff"' % box, shell=True) + ... time.sleep(10) + ... print >> sys.stderr, "Bringing %s back up" % box + ... run("vagrant up %s --no-provision" % box) + ... print >> sys.stderr, "Waiting for services to start..." + ... time.sleep(90) - >>> time.sleep(20) - >>> print >> sys.stderr, "Bringing %s back up" % box - >>> run("vagrant up %s --no-provision" % box) - >>> print >> sys.stderr, "Waiting for services to start..." - >>> time.sleep(60) And, now run tests against the box.