summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rwxr-xr-xtools/to_catlfish.py (renamed from tools/halt.py)5
2 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 61c3f60..edd3c40 100644
--- a/Makefile
+++ b/Makefile
@@ -84,14 +84,17 @@ tests-run2:
tests-stop:
@for node in $(NODES); do \
- ./tools/halt.py to_erl test/nodes/$$node/ ; \
+ ./tools/to_catlfish.py to_erl test/nodes/$$node/ "init:stop()"; \
done
tests-wait:
sleep 5
-tests:
+tests-makemk:
tools/compileconfig.py --config=test/catlfish-test.cfg --testmakefile=test/test.mk --machines 1
+
+tests:
+ @make tests-makemk
@make tests-prepare
@make tests-start
@make tests-run || (make tests-stop ; false)
diff --git a/tools/halt.py b/tools/to_catlfish.py
index 0cb43ed..00a359f 100755
--- a/tools/halt.py
+++ b/tools/to_catlfish.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (c) 2014, NORDUnet A/S.
+# Copyright (c) 2015, NORDUnet A/S.
# See LICENSE for licensing information.
import argparse
@@ -12,12 +12,13 @@ import select
parser = argparse.ArgumentParser(description='')
parser.add_argument('toerl')
parser.add_argument('nodedir')
+parser.add_argument('command')
args = parser.parse_args()
p = subprocess.Popen(
[args.toerl, args.nodedir],
stdin=subprocess.PIPE)
-p.stdin.write("halt().\n")
+p.stdin.write(args.command + ".\n")
p.stdin.flush()
select.select([], [], [], 0.5)
p.stdin.close()