|
@@ -5,16 +5,14 @@ import { workingDirectory, getProgramFolders } from '../utils.mjs';
|
|
|
// Save external programs binaries to the output directory.
|
|
// Save external programs binaries to the output directory.
|
|
|
import './dump.mjs';
|
|
import './dump.mjs';
|
|
|
|
|
|
|
|
|
|
+const hasSolfmt = await which('solfmt', { nothrow: true });
|
|
|
// Test the programs.
|
|
// Test the programs.
|
|
|
-await Promise.all(
|
|
|
|
|
- getProgramFolders().map(async (folder) => {
|
|
|
|
|
- cd(`${path.join(workingDirectory, folder)}`);
|
|
|
|
|
- const hasSolfmt = await which('solfmt', { nothrow: true });
|
|
|
|
|
|
|
+for (const folder of getProgramFolders()) {
|
|
|
|
|
+ cd(`${path.join(workingDirectory, folder)}`);
|
|
|
|
|
|
|
|
- if (hasSolfmt) {
|
|
|
|
|
- await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)} 2>&1 | solfmt`;
|
|
|
|
|
- } else {
|
|
|
|
|
- await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)}`;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-);
|
|
|
|
|
|
|
+ if (hasSolfmt) {
|
|
|
|
|
+ await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)} 2>&1 | solfmt`;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ await $`RUST_LOG=error cargo test-sbf ${process.argv.slice(3)}`;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|