[Compbench-devel] CompBenchmarks++ cloptions.cpp,1.4,1.5
Brought to you by:
xfred
|
From: Frederic T. <xf...@us...> - 2006-09-24 16:28:46
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21154 Modified Files: cloptions.cpp Log Message: --fetch added. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/cloptions.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** cloptions.cpp 19 Sep 2006 17:11:52 -0000 1.4 --- cloptions.cpp 24 Sep 2006 16:28:38 -0000 1.5 *************** *** 18,22 **** std::cout << "Usage: compbenchmarks [specs]" << std::endl << "Where specs is one of :" << std::endl ! << " --install <b-id> : download and pre-configure specified benchmark" << std::endl << " --version : display software version" << std::endl << " --uninstall <b-id> : remove specified benchmark" << std::endl --- 18,24 ---- std::cout << "Usage: compbenchmarks [specs]" << std::endl << "Where specs is one of :" << std::endl ! << " --install <b-id> : download and pre-configure specified benchmark" << std::endl ! << " --fetch <b-id> <tarball> : uses local gzipped-tarball file to prepare" << std::endl ! << " installation of <b-id>" << std::endl << " --version : display software version" << std::endl << " --uninstall <b-id> : remove specified benchmark" << std::endl *************** *** 60,63 **** --- 62,66 ---- {"version", 0, 0, 'v'}, {"install", 1, 0, 'i' }, + {"fetch", 1, 0, 'f'}, {"uninstall", 1, 0, 'u' }, {"list-benchmarks", 0, 0, 'L'}, *************** *** 76,80 **** break; ! c = getopt_long (argc, argv, "vhi:u:LHPC:I:B:2", /* :011000112", */ long_options, &option_index); if (c==-1) { --- 79,83 ---- break; ! c = getopt_long (argc, argv, "vhi:u:LHPCF:1:I:B:2", /* :011000112", */ long_options, &option_index); if (c==-1) { *************** *** 133,136 **** --- 136,163 ---- x=1; break; + case 'F': + if (!optarg) { + std::cerr << "benchmark missing in argument line" << std::endl; + x=1; + break; + } + bench=optarg; + printf("bid='%s'\n", bench.c_str()); + B=SB.select((char*) bench.c_str()); + if (!B) { + cbmUnknownBenchmark((char*) bench.c_str()); + x=1; + break; + } + printf("bench found.\n"); + optind++; + if (optind<=argc) { + B->Fetch(argv[optind-1]); + } else { + std::cerr << "tarball missing in argument line" << std::endl; + x=1; + break; + } + break; case 'B': bench=optarg; |