Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
javierhonduco committed Apr 3, 2024
1 parent 79e20c8 commit 7562bbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
flame.svg
src/bpf/*_skel.rs
.vmtest.log
.vmtest.log
/result
11 changes: 7 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
[[target]]
name = "Fedora 5.15"
kernel = "${kernel_5_15.out}/bzImage"
command = "pushd /tmp && /home/javierhonduco/code/lightswitch/target/x86_64-unknown-linux-gnu/debug/lightswitch --duration 2"
command = "target/x86_64-unknown-linux-gnu/debug/lightswitch --duration 2"
[[target]]
name = "Fedora 6.6"
kernel = "${kernel_6_6.out}/bzImage"
command = "pushd /tmp && /home/javierhonduco/code/lightswitch/target/x86_64-unknown-linux-gnu/debug/lightswitch --duration 2"
command = "target/x86_64-unknown-linux-gnu/debug/lightswitch --duration 2"
'';
nativeBuildInputs = [ vmtest kernel_5_15 kernel_6_6 ];
installPhase = ''
Expand All @@ -104,9 +104,9 @@
dontUnpack = true;

src = pkgs.writeText "run-vmtests" ''
cargo build
${vmtest}/bin/vmtest --config ${vmtest-create-config}/vmtest.toml
'';
# propagatedBuildInputs = [ pkgs.qemu ];
nativeBuildInputs = [ vmtest-create-config ];
installPhase = ''
mkdir -p $out/bin
Expand All @@ -119,6 +119,10 @@
with pkgs;
{
formatter = pkgs.nixpkgs-fmt;
packages = rec {
run-vm-tests = runvmtests;
};


devShells.default = mkShell rec {
# https://discourse.nixos.org/t/how-to-add-pkg-config-file-to-a-nix-package/8264/4
Expand All @@ -132,7 +136,6 @@
llvmPackages_16.libcxx
llvmPackages_16.libclang
llvmPackages_16.lld
runvmtests
# Debugging
strace
gdb
Expand Down

0 comments on commit 7562bbd

Please sign in to comment.