Skip to content

Commit

Permalink
actions: Add pisp HW verification test
Browse files Browse the repository at this point in the history
Signed-off-by: Naushir Patuck <[email protected]>
  • Loading branch information
naushir committed Nov 3, 2023
1 parent c0af289 commit 329758d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/pisp-verification.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pisp verification tests

on:
workflow_dispatch:

pull_request:
branches: [ main ]

env:
BE_TEST_DIR: "${{github.workspace}}/../be_test"
LKG_DIR: "${{github.workspace}}/../lkg"
TESTS_DIR: "/home/pi/pisp_tests"

jobs:
build-test:

runs-on: [ self-hosted, pi5 ]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
clean: true

- name: Configure meson
run: meson setup build -Dbuildtype=debug
timeout-minutes: 5

- name: Build
run: ninja -C build
timeout-minutes: 10

run-test:

runs-on: [ self-hosted, pi5 ]
needs: build-test

steps:
- name: Run verification tests
run: LD_LIBRARY_PATH=${{github.workspace}}/build/src LIBPISP_BE_CONFIG_FILE="${{github.workspace}}/src/libpisp/backend/backend_default_config.json" ${{env.BE_TEST_DIR}}/run_be_tests.py --hw --logall --test ${{env.BE_TEST_DIR}}/be_test ${{env.TESTS_DIR}}
timeout-minutes: 20
4 changes: 3 additions & 1 deletion src/libpisp/backend/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
#include "backend.hpp"

#include <cstdlib>
#include <cstring>

#include "common/logging.hpp"
Expand Down Expand Up @@ -89,7 +90,8 @@ BackEnd::BackEnd(Config const &config, PiSPVariant const &variant)
smart_resize_.resize(2, { 0, 0 });
smart_resize_dirty_ = 0;

initialiseDefaultConfig(config.defaults_file);
const char *env = std::getenv("LIBPISP_BE_CONFIG_FILE");
initialiseDefaultConfig(env ? std::string(env) : config.defaults_file);
}

BackEnd::~BackEnd()
Expand Down

0 comments on commit 329758d

Please sign in to comment.