diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-02 16:55:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 09:26:37 +0200 |
commit | 7e97d8a41f9d7b0fb82742cdd871a18804267c72 (patch) | |
tree | fa7a695b348cac0c881d1bbb0c0071fb77f34040 /build2/test/rule.cxx | |
parent | d7aeb79c65338320a690b404b613f0671a65e403 (diff) |
Restructure testscript parser slightly
Diffstat (limited to 'build2/test/rule.cxx')
-rw-r--r-- | build2/test/rule.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx index 12b052f..487856b 100644 --- a/build2/test/rule.cxx +++ b/build2/test/rule.cxx @@ -423,23 +423,11 @@ namespace build2 if (verb) text << "test " << t << " with " << ts; - const path& sp (ts.path ()); - assert (!sp.empty ()); // Should have been assigned by update. + script::parser p; + script::script s (p.pre_parse (ts, t, wd)); - try - { - script::script s (t, ts, wd); - script::concurrent_runner r; - - ifdstream ifs (sp); - script::parser p; - p.pre_parse (ifs, sp, s); - p.parse (sp, s, r); - } - catch (const io_error& e) - { - fail << "unable to read testscript " << sp << ": " << e.what (); - } + script::concurrent_runner r; + p.parse (s, r); }; for (target* pt: t.prerequisite_targets) |