Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aiobofh/cutest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: aiobofh/cutest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 15, 2017

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    faa2951 View commit details

Commits on Aug 17, 2017

  1. Copy the full SHA
    ccfae0c View commit details

Commits on Aug 18, 2017

  1. Improve release build and reduce coverage text report to only show un…

    …covered lines and branches, along with coverage while running test through valgrind
    aiobofh committed Aug 18, 2017
    Copy the full SHA
    2da515a View commit details

Commits on Aug 21, 2017

  1. Add skip() macro with 'S'/'SKIP' as verdict, and also handle segfault…

    …s in the design under test or test case as 'E'/'ERROR' verdict
    aiobofh committed Aug 21, 2017
    Copy the full SHA
    dcab98e View commit details

Commits on Aug 30, 2017

  1. Prepare for release

    aiobofh committed Aug 30, 2017
    Copy the full SHA
    0235a09 View commit details

Commits on Sep 6, 2017

  1. Copy the full SHA
    0953192 View commit details

Commits on Sep 17, 2017

  1. Copy the full SHA
    16669cc View commit details

Commits on Sep 19, 2017

  1. Add support to specify test names to be run as command line arguments…

    … to the suite-runner exeutable
    aiobofh committed Sep 19, 2017
    Copy the full SHA
    b91a216 View commit details
  2. Copy the full SHA
    f0cc101 View commit details
  3. Copy the full SHA
    9a63284 View commit details
  4. Improve segfault recovery by running the crashing test through gdb if…

    … possible and output the gdb to the corresponding error output
    aiobofh committed Sep 19, 2017
    Copy the full SHA
    93558e1 View commit details

Commits on Oct 16, 2017

  1. Copy the full SHA
    841a31a View commit details
  2. Add clang support

    aiobofh committed Oct 16, 2017
    Copy the full SHA
    9d092fe View commit details

Commits on Nov 7, 2017

  1. Copy the full SHA
    fe71f53 View commit details

Commits on Nov 8, 2017

  1. Copy the full SHA
    625420d View commit details

Commits on Nov 15, 2017

  1. Copy the full SHA
    ec91972 View commit details

Commits on Nov 18, 2017

  1. Copy the full SHA
    4426322 View commit details
  2. Release notes for v1.0.3

    aiobofh committed Nov 18, 2017
    Copy the full SHA
    7419d3a View commit details
  3. Copy the full SHA
    d0105b4 View commit details

Commits on Nov 19, 2017

  1. Copy the full SHA
    4b6da30 View commit details
  2. Copy the full SHA
    13dbe7c View commit details

Commits on Nov 20, 2017

  1. Copy the full SHA
    8556379 View commit details
  2. Copy the full SHA
    659cf6d View commit details
  3. Copy the full SHA
    8b31242 View commit details
  4. Copy the full SHA
    431c64b View commit details
  5. Copy the full SHA
    a147849 View commit details
  6. Copy the full SHA
    5ab4a45 View commit details
  7. Copy the full SHA
    1be1cf3 View commit details

Commits on Dec 2, 2017

  1. Copy the full SHA
    68580c4 View commit details

Commits on Dec 3, 2017

  1. Copy the full SHA
    02a329e View commit details
  2. Rework the calculation of missing test-stuites/lefter-over dut-source…

    …s for pure GNU Make to improve portability
    aiobofh committed Dec 3, 2017
    Copy the full SHA
    090e4fe View commit details

Commits on Dec 4, 2017

  1. Add a pure-C worker tool to launch test suites in parallel instad of …

    …having a bash script in the makefile
    aiobofh committed Dec 4, 2017
    Copy the full SHA
    7b267ea View commit details

Commits on Dec 9, 2017

  1. Copy the full SHA
    fb73080 View commit details
  2. Copy the full SHA
    0fd4f6a View commit details
  3. Reduce the README.rst

    aiobofh committed Dec 9, 2017
    Copy the full SHA
    ed148bd View commit details
  4. Copy the full SHA
    ed2df2e View commit details

Commits on Dec 10, 2017

  1. Copy the full SHA
    7c470d9 View commit details
  2. Copy the full SHA
    7ca6659 View commit details

Commits on Dec 11, 2017

  1. Copy the full SHA
    e180500 View commit details
  2. Copy the full SHA
    f6cc677 View commit details
  3. Copy the full SHA
    406c13e View commit details
  4. A naive build system for cproto, if not installed, and pass the path …

    …to it on to the cutest tools
    aiobofh committed Dec 11, 2017
    Copy the full SHA
    288584c View commit details
  5. Copy the full SHA
    0213d34 View commit details
  6. Copy the full SHA
    4b1a15a View commit details
  7. Copy the full SHA
    b86e1b2 View commit details

Commits on Dec 12, 2017

  1. Copy the full SHA
    8fb9596 View commit details
  2. Add more portability features, CUTest seem to work partially on Amiga…

    …OS and Motorla MC680x0 CPUs now as well
    aiobofh committed Dec 12, 2017
    Copy the full SHA
    c400a23 View commit details
Showing with 10,462 additions and 2,061 deletions.
  1. +10 −2 .gitignore
  2. +111 −35 Makefile
  3. +52 −198 README.rst
  4. +5 −0 examples/Makefile
  5. +16 −4 ...ples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src/Makefile
  6. +16 −0 ...complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src/test/Makefile
  7. +16 −2 examples/complex_directory_structure/my_project_with_separate_src_and_test_folders/Makefile
  8. +1 −0 examples/complex_directory_structure/my_project_with_separate_src_and_test_folders/test/Makefile
  9. +4 −3 examples/file_operations.c
  10. +14 −1 examples/file_operations_test.c
  11. +2 −2 examples/mocking_test.c
  12. +107 −0 examples/regression.c
  13. +221 −0 examples/regression_test.c
  14. +6 −0 examples/self_test.c
  15. +1 −0 examples/simple.c
  16. +67 −0 src/Makefile
  17. +125 −0 src/arg.c
  18. +43 −0 src/arg.h
  19. +413 −0 src/arg_test.c
  20. +21 −7 src/coverage.mk
  21. +124 −0 src/cproto.mk
  22. +567 −0 src/cutest.c
  23. +108 −1,739 src/cutest.h
  24. +253 −68 src/cutest.mk
  25. +87 −0 src/cutest_lenient.h
  26. +278 −0 src/cutest_make.c.scribble
  27. +1,486 −0 src/cutest_mock.c
  28. +48 −0 src/cutest_mock.h
  29. +2,652 −0 src/cutest_mock_test.c
  30. +279 −0 src/cutest_prox.c
  31. +9 −0 src/cutest_prox.h
  32. +608 −0 src/cutest_prox_test.c
  33. +275 −0 src/cutest_run.c
  34. +9 −0 src/cutest_run.h
  35. +502 −0 src/cutest_run_test.c
  36. +34 −0 src/cutest_simple.h
  37. +296 −0 src/cutest_work.c
  38. +614 −0 src/cutest_work_test.c
  39. +7 −0 src/empty.c
  40. +12 −0 src/empty_test.c
  41. +25 −0 src/helpers.c
  42. +9 −0 src/helpers.h
  43. +74 −0 src/helpers_test.c
  44. +10 −0 src/list.c
  45. +57 −0 src/list.h
  46. +103 −0 src/list_test.c
  47. +80 −0 src/mockable.c
  48. +30 −0 src/mockable.h
  49. +268 −0 src/mockable_test.c
  50. +70 −0 src/testcase.c
  51. +17 −0 src/testcase.h
  52. +220 −0 src/testcase_test.c
12 changes: 10 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
cutest*
cutest*.gz
cutest_run
cutest_mock
cutest_prox
cutest_work
*_test_run.c
*.cov
*_mocks.h
*_test
*_test_run.c
*.gcda
*.gcno
*.lst
@@ -10,3 +15,6 @@ cutest*
*.junit_report.xml
*.memcheck
*~
empty
cproto-4.7m.tgz
cproto-4.7m
146 changes: 111 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,59 +2,135 @@
# Makefile to build releases of CUTest
#

#export COVERAGE=1
VERSION=$(shell grep 'CUTEST_VERSION' src/cutest.h | cut -d'"' -f2)
DATE=$(shell /bin/date +"%Y-%m-%d")

all:
@echo "========================" && \
echo "Running regression tests" && \
echo "========================" && \
make -s regression_tests && \
make -s README.rst && \
make -s clean && \
make -s release
@$(MAKE) -r --no-print-directory sanitize_tests && \
$(MAKE) -r --no-print-directory regression_tests && \
$(MAKE) -r --no-print-directory remote_tests && \
$(MAKE) -r --no-print-directory README.rst && \
$(MAKE) -r --no-print-directory clean && \
$(MAKE) -r --no-print-directory release

sanitize_tests:
@echo "==================================================" && \
echo "Running regression tests with -fsanitize and clang" && \
echo "==================================================" && \
echo "" && \
echo "examples:" && \
$(MAKE) -r --no-print-directory -C examples sanitize >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples clean && \
$(MAKE) -r --no-print-directory -C examples clean_cutest && \
echo "my_project_with_a_test_folder_inside_the_src_folder:" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src sanitize >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean_cutest && \
echo "my_project_with_separate_src_and_test_folders:" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders sanitize >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean_cutest && \
echo ""

regression_tests:
make -s -C examples && \
make -s -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src && \
make -s -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders
@echo "==============================================" && \
echo "Running regression tests with valgrind and gcc" && \
echo "==============================================" && \
echo "" && \
echo "examples:" && \
$(MAKE) -r --no-print-directory -C examples valgrind >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples clean && \
$(MAKE) -r --no-print-directory -C examples clean_cutest && \
echo "my_project_with_a_test_folder_inside_the_src_folder:" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src valgrind >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean_cutest && \
echo "my_project_with_separate_src_and_test_folders:" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders valgrind >/dev/null && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean_cutest && \
echo ""

arm:
@echo "examples on ARM running Debian Jessie:" && \
ssh -q cutest_arm 'rm -rf /tmp/cutest; mkdir /tmp/cutest' && \
scp -q -r src examples cutest_arm:/tmp/cutest/. &&\
ssh -q cutest_arm 'make -r --no-print-directory -C /tmp/cutest/examples check' && echo "OK"
ppc:
@echo "examples on PowerPC (G4) running Ubuntu Xenial:" && \
ssh -q cutest_ppc 'rm -rf /tmp/cutest; mkdir /tmp/cutest' && \
scp -q -r src examples cutest_ppc:/tmp/cutest/. &&\
ssh -q cutest_ppc 'make -r --no-print-directory -C /tmp/cutest/examples check' && echo "OK"

remote: arm ppc

remote_tests:
@echo "==============================================" && \
echo "Running remote tests" && \
echo "==============================================" && \
echo "" && \
$(MAKE) -r --no-print-directory -C examples clean && \
$(MAKE) -r --no-print-directory -C examples clean_cutest && \
$(MAKE) -r --no-print-directory -C examples clean_cproto && \
$(MAKE) -r --no-print-directory remote

release: cutest-$(VERSION).tar.gz

cutest-$(VERSION).tar.gz:
@echo "Checking git repository for version tag v$(VERSION)" && \
@echo "==============================================" && \
echo "Checking git repository for version tag v$(VERSION)" && \
echo "==============================================" && \
echo "" && \
git tag -l | grep "v$(VERSION)" && echo "Version v$(VERSION) is already released" && \
git tag -l | grep "v$(VERSION)" && exit 1 || \
echo "OK, version not found... Creating release" && \
echo "OK" && \
echo "" && \
echo "=================" && \
echo "Creating tar-ball" && \
echo "=================" && \
echo "" && \
mkdir cutest-$(VERSION) && \
cp -r LICENSE examples src cutest-$(VERSION)/. && \
rm -rf cutest-$(VERSION)/.git* && \
rm -rf cutest-$(VERSION)/Makefile && \
tar -c cutest-$(VERSION) | gzip > $@ && \
rm -rf cutest-$(VERSION) && \
mkdir tmp && \
cp cutest-$(VERSION).tar.gz tmp/. && \
cd tmp && \
tar -xzf cutest-$(VERSION).tar.gz && \
cd cutest-$(VERSION) && \
cp ../../Makefile . && \
echo "========================" && \
echo "Testing tar-ball" && \
echo "========================" && \
make -s regression_tests && \
cd ../../ && \
rm -rf tmp && \
echo "" && \
echo "ALL OK!!! Go ahead and upload the cutest-$(VERSION).tar.gz then inform the public!" && \
echo ""
echo "OK" && \
echo "" && \
tar -xzf cutest-$(VERSION).tar.gz && cp Makefile cutest-$(VERSION)/. && \
echo "==============================" && \
echo "Testing tar-ball with valgrind" && \
echo "==============================" && \
echo "" && \
$(MAKE) -r --no-print-directory -C cutest-$(VERSION) regression_tests && \
rm -rf cutest-$(VERSION) && \
grep 'yyyy-mm-dd' README.rst >/dev/null && (bash -c 'echo -e "\e[31mWARNING!!!\e[0m: cutest.h still as yyyy-mm-dd. You need to update it."'; echo "Removing $@"; rm -f $@; true); \
grep ' * * v$(VERSION) $(DATE)' README.rst >/dev/null || (bash -c 'echo -e "\e[31mWARNING!!!\e[0m: cutest.h has wrong date."'; echo "Removing $@"; rm -f $@: true); \
git status | grep 'git add' >/dev/null && (git status; echo "Removing $@" && rm -f $@; true); \
test -f $@ && echo "\nALL OK!!! Go ahead and upload the cutest-$(VERSION).tar.gz then inform the public!\n"

README.rst:
@cd examples && \
make -s cutest_help.rst && \
mv cutest_help.rst ../$@ && \
make -s clean
foo:
bash -c 'echo -e "\e[31mWARNING\e[0m: cutest.h still as yyyy-mm-dd. You need to update it."'

examples/cutest_help.rst:
@$(MAKE) -r --no-print-directory -C examples $(abspath examples/cutest_help.rst)

README.rst: examples/cutest_help.rst
@echo "=============================="; \
echo "Generating new README.rst file"; \
echo "=============================="; \
echo "" && \
mv $^ $@ && echo "OK" && \
$(MAKE) -r --no-print-directory -C examples clean && \
echo ""

clean:
@rm -rf tmp cutest-* *~ && \
make -s -C examples clean && \
make -s -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean && \
make -s -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean
$(MAKE) -r --no-print-directory -C examples clean && \
$(MAKE) -r --no-print-directory -C examples clean_cutest && \
$(MAKE) -r --no-print-directory -C examples clean_cproto && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_a_test_folder_inside_the_src_folder/src clean_cutest && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean && \
$(MAKE) -r --no-print-directory -C examples/complex_directory_structure/my_project_with_separate_src_and_test_folders clean_cutest
Loading