about summary refs log tree commit diff stats
path: root/050scenario.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-10 10:25:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-10 10:25:44 -0700
commitba32c4f0594c68bd8d3ef53d818d30193a308d95 (patch)
tree9424e982f865ee75f9928ba4f32bac7e1a2cadac /050scenario.cc
parent7402ce32ee0cd3301677d0037718b175868a56a8 (diff)
downloadmu-ba32c4f0594c68bd8d3ef53d818d30193a308d95.tar.gz
1746 - load file and run a single test
  $ ./mu test run-instruction-and-print-warnings
Diffstat (limited to '050scenario.cc')
-rw-r--r--050scenario.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/050scenario.cc b/050scenario.cc
index a87c1b26..8200d702 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -116,13 +116,12 @@ for (long long int i = 0; i < SIZE(Scenarios); ++i) {
 }
 
 //: Convenience: run a single named scenario.
-:(before "Loading Commandline Files")
-if (argc == 2 && Run_tests) {
-  for (long long int i = 0; i < SIZE(Scenarios); ++i) {
-    if (Scenarios.at(i).name == argv[1]) {
-      run_mu_scenario(Scenarios.at(i));
-      return 0;
-    }
+:(after "Test Runs")
+for (long long int i = 0; i < SIZE(Scenarios); ++i) {
+  if (Scenarios.at(i).name == argv[argc-1]) {
+    run_mu_scenario(Scenarios.at(i));
+    if (Passed) cerr << ".\n";
+    return 0;
   }
 }
 
fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/sh
# Run tests for just a subset of layers.
#
# Usage:
#   build_and_test_until [file prefix] [test name]
# Provide the second arg to run just a single test.
set -e

# clean previous builds if they were building until a different layer
touch .until
PREV_UNTIL=`cat .until`
if [ "$PREV_UNTIL" != $1 ]
then
  ./clean top-level
  echo $1 > .until
fi

ONLY_CPP=1 ./build --until $1  &&  ./subx_bin test $2