Skip to content

Commit 94cbbc8

Browse files
SharzyLsequencer
authored andcommitted
[eval] add build
1 parent 3170822 commit 94cbbc8

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

tests/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ let
9191
pytorch = casesSelf.callPackage ./pytorch { };
9292
disp = casesSelf.callPackage ./disp { };
9393
emurt-test = casesSelf.callPackage ./emurt/tests { };
94+
eval = casesSelf.callPackage ./eval { };
9495
}));
9596

9697
# remove non-case attributes in scope
9798
scopeStripped = {
98-
inherit (scope) mlir intrinsic asm perf codegen rvv_bench pytorch disp emurt-test;
99+
inherit (scope) mlir intrinsic asm perf codegen rvv_bench pytorch disp emurt-test eval;
99100
};
100101

101102
# This derivation is for internal CI use only.

tests/eval/default.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{ lib
2+
, linkerScript
3+
, makeBuilder
4+
, findAndBuild
5+
, t1main
6+
, getTestRequiredFeatures
7+
}:
8+
9+
let
10+
builder = makeBuilder { casePrefix = "eval"; };
11+
build = { caseName, sourcePath }:
12+
builder {
13+
inherit caseName;
14+
15+
src = sourcePath;
16+
17+
passthru.featuresRequired = getTestRequiredFeatures sourcePath;
18+
isFp = lib.pathExists (lib.path.append sourcePath "isFp");
19+
20+
buildPhase = ''
21+
runHook preBuild
22+
23+
$CC -T${linkerScript} \
24+
*.{c,S} \
25+
${t1main} \
26+
-o $pname.elf
27+
28+
runHook postBuild
29+
'';
30+
31+
meta.description = "test case '${caseName}', written in C assembly";
32+
};
33+
in
34+
findAndBuild ./. build

0 commit comments

Comments
 (0)