From 19e0ee8728c9e3cfc80e2fe84c2d1ff81b0dd0b9 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 15 Dec 2008 17:40:16 -0200 Subject: [PATCH] Make test cases execute in alphabetic order Remove nm's -p switch so alphabetic order is used to get the test suite symbols (test cases and initialization/termination functions). This way execution order can be deterministic. --- mkmutest | 2 +- mutest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkmutest b/mkmutest index 32c0e5a..763cc92 100755 --- a/mkmutest +++ b/mkmutest @@ -34,7 +34,7 @@ for file in "$@" do pr_file=`echo "$file" | sed 's/\"/\\\\\"/g'` suite=`basename "$file" .o | sed 's/\"/\\\\\"/g'` - symbols=`nm -p "$file" | egrep '^[[:xdigit:]]{8} T mu_\w+$' | cut -c12-` + symbols=`nm "$file" | egrep '^[[:xdigit:]]{8} T mu_\w+$' | cut -c12-` tests=`echo "$symbols" | egrep '^mu_test'` inits=`echo "$symbols" | egrep '^mu_init'` terms=`echo "$symbols" | egrep '^mu_term'` diff --git a/mutest b/mutest index 44d6414..a0e7d82 100755 --- a/mutest +++ b/mutest @@ -102,7 +102,7 @@ class TestSuiteInfo (object): cases_re = re.compile(r'[0-9a-f]{8} T (mu_test\w*)', re.I) def __init__(self, so_name): - proc = Popen(['nm', '-p', so_name], stdout=PIPE) + proc = Popen(['nm', so_name], stdout=PIPE) output = proc.communicate()[0] self.inits = self.inits_re.findall(output) self.terms = self.terms_re.findall(output) -- 2.43.0