[Swift-commit] cog r3496
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Sun Oct 28 21:45:06 CDT 2012
------------------------------------------------------------------------
r3496 | hategan | 2012-10-28 21:43:59 -0500 (Sun, 28 Oct 2012) | 1 line
added directory argument to run-coaster-job
------------------------------------------------------------------------
Index: modules/provider-coaster-c-client/src/RunCoasterJob.cpp
===================================================================
--- modules/provider-coaster-c-client/src/RunCoasterJob.cpp (revision 3495)
+++ modules/provider-coaster-c-client/src/RunCoasterJob.cpp (working copy)
@@ -19,6 +19,7 @@
{"env", required_argument, 0, 'e'},
{"attr", required_argument, 0, 'a'},
{"option", required_argument, 0, 'o'},
+ {"dir", required_argument, 0, 'd'},
{"stdout", required_argument, 0, 'O'},
{"stderr", required_argument, 0, 'E'},
{"verbosity", required_argument, 0, 'v'},
@@ -48,6 +49,7 @@
char* stdoutLoc = NULL;
char* stderrLoc = NULL;
char* verbosity = NULL;
+string* dir = NULL;
int main(int argc, char* argv[]) {
try {
@@ -65,7 +67,7 @@
void parseArguments(int argc, char* argv[]) {
int oindex, c;
while (true) {
- c = getopt_long(argc, argv, "hs:e:a:o:j:O:E:v:", long_options, &oindex);
+ c = getopt_long(argc, argv, "hs:e:a:o:j:d:O:E:v:", long_options, &oindex);
if (c == -1) {
break;
}
@@ -85,6 +87,9 @@
case 'j':
jobManager = optarg;
break;
+ case 'd':
+ dir = new string(optarg);
+ break;
case 'O':
stdoutLoc = optarg;
break;
@@ -216,6 +221,11 @@
client.setOptions(s);
Job j(executable);
+
+ if (dir != NULL) {
+ j.setDirectory(*dir);
+ }
+
for (i = args.begin(); i != args.end(); i++) {
j.addArgument(*i);
}
More information about the Swift-commit
mailing list