From 6758b2e36a058eb5b9a3c2ec719a36a48179225b Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 22 Apr 2015 18:21:01 +0200 Subject: Replace halt.py with a more generic to_catlfish.py. Use to_catlfish.py with "init:stop()". This will be useful for stopping in non testing scenarios. --- Makefile | 7 +++++-- tools/halt.py | 24 ------------------------ tools/to_catlfish.py | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 26 deletions(-) delete mode 100755 tools/halt.py create mode 100755 tools/to_catlfish.py 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/halt.py deleted file mode 100755 index 0cb43ed..0000000 --- a/tools/halt.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Copyright (c) 2014, NORDUnet A/S. -# See LICENSE for licensing information. - -import argparse -import subprocess -import sys -import select - -parser = argparse.ArgumentParser(description='') -parser.add_argument('toerl') -parser.add_argument('nodedir') -args = parser.parse_args() - -p = subprocess.Popen( - [args.toerl, args.nodedir], - stdin=subprocess.PIPE) -p.stdin.write("halt().\n") -p.stdin.flush() -select.select([], [], [], 0.5) -p.stdin.close() -p.wait() diff --git a/tools/to_catlfish.py b/tools/to_catlfish.py new file mode 100755 index 0000000..00a359f --- /dev/null +++ b/tools/to_catlfish.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright (c) 2015, NORDUnet A/S. +# See LICENSE for licensing information. + +import argparse +import subprocess +import sys +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(args.command + ".\n") +p.stdin.flush() +select.select([], [], [], 0.5) +p.stdin.close() +p.wait() -- cgit v1.1