Skip to content

Commit

Permalink
[emurt] add simple write char test
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Jan 8, 2025
1 parent f0d6733 commit af443a0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ let
rvv_bench = casesSelf.callPackage ./rvv_bench { };
pytorch = casesSelf.callPackage ./pytorch { };
disp = casesSelf.callPackage ./disp { };
emurt = casesSelf.callPackage ./emurt/tests { };
}));

# remove non-case attributes in scope
scopeStripped = {
inherit (scope) mlir intrinsic asm perf codegen rvv_bench pytorch disp;
inherit (scope) mlir intrinsic asm perf codegen rvv_bench pytorch disp emurt;
};

# This derivation is for internal CI use only.
Expand Down
31 changes: 31 additions & 0 deletions tests/emurt/tests/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ linkerScript, t1main, makeBuilder, writeText }:
let
builder = makeBuilder { casePrefix = "emurt"; };
in
{
simple = builder {
caseName = "simple";

dontUnpack = true;
csrc = writeText "simple-emurt-test.c" ''
#include <emurt.h>
void test() {
place_counter(1);
print_s("helloworld");
place_counter(2);
}
'';

buildPhase = ''
runHook preBuild
$CC -T${linkerScript} \
$csrc \
${t1main} \
-o $pname.elf
runHook postBuild
'';
};
}

0 comments on commit af443a0

Please sign in to comment.