-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(xs-vat-worker): locateWorkerBin finds built executable
- Loading branch information
Showing
7 changed files
with
30 additions
and
10 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
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
/** | ||
* Locate the XS vat worker executable. | ||
* | ||
* Note: executable is not built by default. | ||
* @see the `build:xs-lin` script in package.json | ||
* | ||
* @param {{ resolve: (...string) => string }} filesystem path access | ||
* @returns { string } full path where linux debug executable is built; | ||
* not guaranteed to exist. | ||
*/ | ||
export function locateWorkerBin({ resolve }) { | ||
const goal = 'debug'; // ISSUE: support, test release too? | ||
const os = 'lin'; // ISSUE: support, test mac too? | ||
return resolve(__dirname, '../build/bin', os, goal, 'xs-vat-worker'); | ||
} |
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { resolve } from 'path'; | ||
|
||
import { test } from 'tape-promise/tape'; | ||
|
||
import { xsWorkerBin } from '../src/locate'; | ||
import { locateWorkerBin } from '../src/locate'; | ||
|
||
test('locateWorkerBin', t => { | ||
t.ok(!xsWorkerBin || xsWorkerBin.endsWith('xs-vat-worker')); | ||
const bin = locateWorkerBin({ resolve }); | ||
t.ok(bin.startsWith('/')); | ||
t.ok(bin.endsWith('/xs-vat-worker')); | ||
t.end(); | ||
}); |
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