Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial working version of Makefile, test.sh -> pytest,unit-tests #4

Merged
merged 2 commits into from
May 21, 2023

Conversation

gapisback
Copy link
Member

This commit adds initial working version of Makefile using which we can now 'make' main.c + single_file_prog_test.c to create bin/unit_test . Following should work:

    export CC=gcc
    export LD=gcc
    make clean
    make                    # release binary
    BUILD_MODE=debug make

The binary to test is at: ./build/{release,debug}/bin/unit_test

Extend test.sh to support --list and to run individual test-fn-name
Add run_unit_tests(), works in release & debug build modes.

Aditya Gurajada added 2 commits May 20, 2023 22:18
This commit integrates a stripped-down version of CUnit tests machinery
to build and run unit-tests. CUnit tests are taken from
https://github.com/bvdberg/ctest and the barebones CUnit test sources
are inherited from SplinterDB unit-tests:
https://github.com/vmware/splinterdb/tree/main/tests/unit
This commit adds initial working version of Makefile using
which we can now 'make' main.c + single_file_prog_test.c
to create bin/unit_test . Following should work:

export CC=gcc
export LD=gcc
make clean
make                    # release binary
BUILD_MODE=debug make

The binary to test is at: ./build/{release,debug}/bin/unit_test

Extend test.sh to support --list and to run individual test-fn-name
Add run_unit_tests(), works in release & debug build modes.

$ ./test.sh run_pytests | run_unit_tests    # should work now.
@gapisback gapisback merged commit 7f8f1af into main May 21, 2023
4 checks passed
@gapisback gapisback deleted the Make-unit-tests branch May 21, 2023 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant