-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added dht bootstrap to tests * removed system pear in ci * removed artifact folder in CI * pass bootstrap to pear-updater-bootstraper * clean up * added verbose flag * smoke working * added stream teardown in teardown tests * isolate * pear-updater-bootstap 1.2.0 * only lin * enc test fix * fix * artifact to artefact rename * handle streams in update tests * corrected teardown * corrected teardown * corrected teardown * more fixes * more fixes * more fixes * fix * enable all machines * fix * fix * explicit bump pear-ipc * renamed --bootstrap to --dht-bootstrap * flag parsing in sidecar subsystem instead * default bootstrap fix * refactor default bootstrap fix --------- Co-authored-by: dmc <david.mark.clements@gmail.com>
- Loading branch information
1 parent
f08d3fe
commit 8868eab
Showing
19 changed files
with
200 additions
and
157 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 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 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,38 @@ | ||
'use strict' | ||
import url from 'bare-url' | ||
import path from 'bare-path' | ||
import { spawn, spawnSync } from 'bare-subprocess' | ||
import { RUNTIME } from '../constants' | ||
import createTestnet from '@hyperswarm/testnet' | ||
import fs from 'bare-fs' | ||
import { isWindows } from 'which-runtime' | ||
|
||
const filename = url.fileURLToPath(import.meta.url) | ||
const dirname = path.dirname(filename) | ||
const root = path.dirname(dirname) | ||
|
||
const force = Bare.argv.includes('--force-install') | ||
|
||
const dirs = [ | ||
path.join(root, 'test', 'fixtures', 'harness', 'node_modules'), | ||
path.join(root, 'test', 'fixtures', 'encrypted', 'node_modules') | ||
] | ||
for (const dir of dirs) { | ||
if (force === false && fs.existsSync(dir)) continue | ||
console.log(force ? 'reinstalling node_modules in' : 'node_modules not found in', path.dirname(dir)) | ||
console.log('Running npm install...') | ||
if (isWindows) spawnSync('pwsh', ['-Command', 'npm install'], { cwd: path.dirname(dir), stdio: 'inherit' }) | ||
else spawnSync('npm', ['install'], { cwd: path.dirname(dir), stdio: 'inherit' }) | ||
} | ||
|
||
const testnet = await createTestnet(10) | ||
const dhtBootstrap = testnet.nodes.map(e => `${e.host}:${e.port}`).join(',') | ||
|
||
const verbose = Bare.argv.includes('--verbose') ? '--verbose' : '' | ||
|
||
const tests = spawn(RUNTIME, ['run', '--dht-bootstrap', dhtBootstrap, '-t', 'test', verbose], { cwd: root, stdio: 'inherit' }) | ||
|
||
tests.on('exit', async (code) => { | ||
await testnet.destroy() | ||
Bare.exitCode = code | ||
}) |
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 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
Oops, something went wrong.