44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
import path from "node:path";
|
|
import { root, run, troveBin } from "./suite.mjs";
|
|
const plugin = path.join(root, "curios/harmony-connector");
|
|
run(process.execPath, [path.join(plugin, "build.mjs")]);
|
|
run(
|
|
"cargo",
|
|
[
|
|
"test",
|
|
"--locked",
|
|
"--manifest-path",
|
|
path.join(plugin, "native/Cargo.toml"),
|
|
],
|
|
{
|
|
env: {
|
|
...process.env,
|
|
HARMONY_NATIVE_PREFIX: path.join(plugin, "dist/native-deps/install"),
|
|
MACOSX_DEPLOYMENT_TARGET: "13.0",
|
|
},
|
|
},
|
|
);
|
|
run(process.execPath, ["--test", path.join(plugin, "ui/format.test.js")]);
|
|
run(process.execPath, ["--test", path.join(plugin, "ui/screen-geometry.test.js")]);
|
|
run(process.execPath, ["--test", path.join(root, "tools/harmony-ui.test.mjs")]);
|
|
const prefix = path.join(plugin, "dist/native-deps/install");
|
|
const bridgeTest = path.join(plugin, "dist/mtp-bridge-test");
|
|
run("cc", [
|
|
"-I" + path.join(prefix, "include"),
|
|
path.join(plugin, "native/tests/mtp_bridge_test.c"),
|
|
path.join(plugin, "native/src/mtp_bridge.c"),
|
|
"-L" + path.join(prefix, "lib"),
|
|
"-lmtp",
|
|
"-lusb-1.0",
|
|
"-o",
|
|
bridgeTest,
|
|
]);
|
|
run(bridgeTest, []);
|
|
run(troveBin, [
|
|
"protocol",
|
|
"test",
|
|
"--command",
|
|
path.join(plugin, "backend/harmony-connector"),
|
|
]);
|
|
run(path.join(plugin, "backend/harmony-connector"), ["--diagnose"]);
|