Skip to content

Commit

Permalink
fix(baremetal): update recipe to use bao-baremetal-test repo
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Costa <[email protected]>
  • Loading branch information
Diogo21Costa committed Aug 21, 2024
1 parent db1516f commit 62d283b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions pkgs/guest/tf/baremetal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Bao Project and Contributors. All rights reserved.

{ stdenv
, fetchFromGitHub
, fetchgit
, toolchain
, python3
, python3Packages
Expand All @@ -23,11 +23,11 @@ stdenv.mkDerivation rec {
version = "1.0.0";

guest_srcs = if baremetal_srcs_path == " " || baremetal_srcs_path == null then
fetchFromGitHub {
owner = "bao-project";
repo = "bao-baremetal-guest";
rev = "c7973b4cbbfee1baecd6e0705261d5c4a01d3318";
sha256 = "sha256-uXJi9ow87P798JrztsB0BeAhqEW5Fnsx2uHfrUvPCwk=";
fetchgit {
url = "https://github.com/bao-project/bao-baremetal-test";
rev = "b7e83d04f49f8c98581ce8d18bb7ea8a7a6ba589";
sha256 = "sha256-oDKm8yxtqDvbCrZ5gnrVDEaKtFFu5WS0GYtkcJAtbbA=";
fetchSubmodules = true;
}
else
baremetal_srcs_path;
Expand All @@ -52,17 +52,14 @@ stdenv.mkDerivation rec {
python3 codegen.py -dir $out/tests/src -o $out/tests/bao-tests/src/testf_entry.c
cd $out
'';

patches = [
"${setup-cfg.baremetal_patch}"
];

buildPhase = ''
export ARCH=${setup-cfg.arch}
export CROSS_COMPILE=${setup-cfg.toolchain_name}-
export TESTF_TESTS_DIR=$out/tests/src
export TESTF_REPO_DIR=$out/tests/bao-tests
if [ "ARCH" == "aarch64" ]; then
if [ "$ARCH" == "aarch64" ]; then
make -C $out PLATFORM=${setup-cfg.platform_name} \
BAO_TEST=1 SUITES=${list_suites} TESTS=${list_tests} \
TESTF_LOG_LEVEL=${log_level} \
Expand Down

0 comments on commit 62d283b

Please sign in to comment.