-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test isolve-mpi.js
- Loading branch information
Showing
6 changed files
with
120 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// node isolve-mpi.js [url] [user] [password] [--demo] | ||
|
||
const utils = require('../utils/utils'); | ||
const tutorialBase = require('./tutorialBase'); | ||
|
||
const args = process.argv.slice(2); | ||
const { | ||
url, | ||
user, | ||
pass, | ||
newUser, | ||
enableDemoMode | ||
} = utils.parseCommandLineArguments(args) | ||
|
||
const templateName = "isolve-mpi"; | ||
|
||
async function runTutorial() { | ||
const tutorial = new tutorialBase.TutorialBase(url, templateName, user, pass, newUser, enableDemoMode); | ||
|
||
try { | ||
tutorial.startScreenshooter(); | ||
await tutorial.start(); | ||
const studyData = await tutorial.openTemplate(1000); | ||
const studyId = studyData["data"]["uuid"]; | ||
console.log("Study ID:", studyId); | ||
|
||
// Some time for loading the workbench | ||
await tutorial.waitFor(5000); | ||
|
||
await tutorial.runPipeline(studyId, 20000); | ||
console.log('Checking isolve-mpi results:'); | ||
await tutorial.openNodeFiles(1); | ||
const outFiles = [ | ||
"logs.zip", | ||
"output.h5", | ||
"log.tgz" | ||
]; | ||
await tutorial.checkResults(outFiles.length); | ||
|
||
// check logs | ||
const mustHave = "Running MPI version 3.1 on 2 processes"; | ||
const found = await tutorial.findLogMessage(mustHave); | ||
if (found) { | ||
console.log("Running MPI version 3.1 on 2 processes"); | ||
} | ||
else { | ||
throw "MPI not working"; | ||
} | ||
|
||
await tutorial.toDashboard(); | ||
|
||
await tutorial.removeStudy(studyId); | ||
} | ||
catch(err) { | ||
tutorial.setTutorialFailed(true); | ||
console.log('Tutorial error: ' + err); | ||
} | ||
finally { | ||
await tutorial.logOut(); | ||
tutorial.stopScreenshooter(); | ||
await tutorial.close(); | ||
} | ||
|
||
if (tutorial.getTutorialFailed()) { | ||
throw "Tutorial Failed"; | ||
} | ||
} | ||
|
||
runTutorial() | ||
.catch(error => { | ||
console.log('Puppeteer error: ' + error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters