aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-10-28 00:50:02 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:36 +0200
commit18235d8e5f37c0e65b5f1e3cacb6e3d27c3e05eb (patch)
tree7f41d442210d6159be2853a663af989ff58cc424 /tests/test/script/runner/driver.cxx
parentb3e6cb1b899dcc6b3488f10d8eee437a6f87ad15 (diff)
Add support of paths cleanups to testscript runner
Diffstat (limited to 'tests/test/script/runner/driver.cxx')
-rw-r--r--tests/test/script/runner/driver.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test/script/runner/driver.cxx b/tests/test/script/runner/driver.cxx
index fdada73..10d5857 100644
--- a/tests/test/script/runner/driver.cxx
+++ b/tests/test/script/runner/driver.cxx
@@ -10,12 +10,18 @@
#include <iostream>
#include <exception>
+#include <butl/path>
+#include <butl/fdstream>
+#include <butl/filesystem>
+
using namespace std;
+using namespace butl;
int
main (int argc, char* argv[])
{
// Usage: driver [-i <int>] [-s <int>] (-o <string>)* (-e <string>)*
+ // (-f <file>)* (-d <dir>)*
//
int status (256);
int ifd (3);
@@ -72,6 +78,15 @@ main (int argc, char* argv[])
status = toi (v);
assert (status >= 0 && status < 256);
}
+ else if (o == "-f")
+ {
+ ofdstream os (v);
+ os.close ();
+ }
+ else if (o == "-d")
+ {
+ try_mkdir_p (dir_path (v));
+ }
else
assert (false);
}