Skip to content

Commit

Permalink
Simpler check if running the testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Oct 7, 2016
1 parent c5383bb commit a4f724f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/ClassLoader.mo
Expand Up @@ -144,7 +144,7 @@ algorithm
(mp,name,isDir) := System.getLoadModelPath(id,prios,mps,requireExactVersion);
else
pwd := System.pwd();
userLibraries := Settings.getHomeDir(Config.getRunningTestsuiteFile()<>"") + "/.openmodelica/libraries/";
userLibraries := Settings.getHomeDir(Config.getRunningTestsuite()) + "/.openmodelica/libraries/";
true := System.directoryExists(userLibraries);
true := listMember(userLibraries, mps);
System.cd(userLibraries);
Expand Down Expand Up @@ -201,11 +201,11 @@ algorithm
encodingfile = stringAppendList({path,pd,name,pd,"package.encoding"});
encoding = System.trimChar(System.trimChar(if System.regularFileExists(encodingfile) then System.readFile(encodingfile) else Util.getOptionOrDefault(optEncoding,"UTF-8"),"\n")," ");

if Config.getRunningTestsuiteFile()<>"" or Config.noProc()==1 then
if Config.getRunningTestsuite() or Config.noProc()==1 then
strategy = STRATEGY_ON_DEMAND(encoding);
else
filenames = getAllFilesFromDirectory(path + pd + name);
// print("Files load in parallel:\n" + stringDelimitList(filenames, "\n") + "\n");
// print("Files load in parallel:\n" + stringDelimitList(filenames, "\n") + "\n");
strategy = STRATEGY_HASHTABLE(Parser.parallelParseFiles(filenames, encoding));
end if;
cl = loadCompletePackageFromMp(id, name, path, strategy, Absyn.TOP(), Error.getNumErrorMessages());
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Parser.mo
Expand Up @@ -169,7 +169,7 @@ function parallelParseFilesWork
protected
list<tuple<String,String>> workList = list((file,encoding) for file in filenames);
algorithm
if Config.getRunningTestsuiteFile()<>"" or Config.noProc()==1 or numThreads == 1 or listLength(filenames)<2 then
if Config.getRunningTestsuite() or Config.noProc()==1 or numThreads == 1 or listLength(filenames)<2 then
partialResults := list(loadFileThread(t) for t in workList);
else
// GC.disable(); // Seems to sometimes break building nightly omc
Expand Down

0 comments on commit a4f724f

Please sign in to comment.