Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1029 from rainers/runbench_run_args
Browse files Browse the repository at this point in the history
runbench: use RUN_ARGS to pass DRT arguments through command line
  • Loading branch information
MartinNowak committed Nov 25, 2014
2 parents 978b72e + aef10a3 commit 445d3d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions benchmark/runbench.d
Expand Up @@ -25,6 +25,7 @@ void usage()
"\n"
" relevant environment variables:\n"
" ARGS: arguments always passed to the compiler\n"
" RUN_ARGS: arguments always passed to the test\n"
" DMD: compiler to use, ex: ../src/dmd\n"
" CC: C++ compiler to use, ex: dmc, g++\n"
" OS: win32, win64, linux, freebsd, osx\n"
Expand Down Expand Up @@ -65,6 +66,7 @@ struct EnvData
string ccompiler;
string model;
string required_args;
string run_args;
}

bool findTestParameter(string file, string token, ref string result)
Expand Down Expand Up @@ -309,9 +311,7 @@ int main(string[] args)
envData.ccompiler = environment.get("CC");
envData.model = environment.get("MODEL", envData.os == "win32" ? "32" : "64");
envData.required_args = environment.get("ARGS", "-O -release -inline");

if (std.file.exists("../src/gc/config.d"))
envData.required_args ~= " -version=initGCFromEnvironment ../src/gc/config.d";
envData.run_args = environment.get("RUN_ARGS", "");

if (envData.ccompiler.empty)
{
Expand Down Expand Up @@ -511,7 +511,8 @@ int runTest(const ref EnvData envData, string tst, string test_args)
command ~= " " ~ test_args;
else if (!testArgs.executeArgs.empty)
command ~= " " ~ testArgs.executeArgs;

if (!envData.run_args.empty)
command ~= " " ~ envData.run_args;
removeIfExists("gcx.log");

StopWatch sw;
Expand Down

0 comments on commit 445d3d3

Please sign in to comment.