Skip to content

Commit

Permalink
Add testing infrastracture
Browse files Browse the repository at this point in the history
  • Loading branch information
Waujito committed Jan 2, 2025
1 parent 5c84f2e commit b36d1ee
Show file tree
Hide file tree
Showing 13 changed files with 5,190 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@ jobs:
name: static-youtubeUnblock-${{ matrix.arch }}
path: ./**/static-youtubeUnblock*.tar.gz

test:
needs: prepare
name: test
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64]
branch: [latest-stable]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
id: build
shell: bash
run: |
make build_test -j$(nproc)
- name: Test
id: test
run:
./build/testYoutubeUnblock

build-kmod:
needs: prepare
name: build-kmod ${{ matrix.kernel_version }}
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ PKG_FULLVERSION := $(PKG_VERSION)-$(PKG_RELEASE)

export PKG_VERSION PKG_RELEASE PKG_FULLVERSION

.PHONY: $(USPACE_TARGETS) $(KMAKE_TARGETS) clean
.PHONY: $(USPACE_TARGETS) $(KMAKE_TARGETS) test build_test clean distclean kclean
$(USPACE_TARGETS):
@$(MAKE) -f uspace.mk $@

$(KMAKE_TARGETS):
@$(MAKE) -f kmake.mk $@

build_test:
-@$(MAKE) -f uspace.mk build_test

test:
-@$(MAKE) -f uspace.mk test

clean:
-@$(MAKE) -f uspace.mk clean

Expand Down
17 changes: 17 additions & 0 deletions test/main_fn.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "config.h"
#include "unity_fixture.h"

struct instance_config_t instance_config = {
.send_raw_packet = NULL,
.send_delayed_packet = NULL,
};

static void RunAllTests(void)
{
RUN_TEST_GROUP(QuicTest);
}

int main(int argc, const char * argv[])
{
return UnityMain(argc, argv, RunAllTests);
}
17 changes: 17 additions & 0 deletions test/quic.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "unity.h"
#include "unity_fixture.h"

TEST_GROUP(QuicTest);

TEST_SETUP(QuicTest)
{
}

TEST_TEAR_DOWN(QuicTest)
{
}


TEST_GROUP_RUNNER(QuicTest)
{
}
Loading

0 comments on commit b36d1ee

Please sign in to comment.