Skip to content

refactor: Translation bug fix + add: New test and new params for test suite - #13

Open
Static-Codes wants to merge 6 commits into
fritzone:masterfrom
Static-Codes:master
Open

refactor: Translation bug fix + add: New test and new params for test suite#13
Static-Codes wants to merge 6 commits into
fritzone:masterfrom
Static-Codes:master

Conversation

@Static-Codes

@Static-Codes Static-Codes commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Good evening Fritz,

As previously mentioned, I will be slowly but steadily improving the project over the coming months.

Today I was able to do the following:

  • 1a. Fixed a translation bug in the function process_a_define() inside processing.py

  • 1b. Added TODO comments

  • 2a. Added strongswan to the suite of tests, now totaling 5.

  • 2b. Added 3 additional Boolean parameters to run_test; keep_test_artifacts, skip_test, recursive_scan

    • Commit
    • Note: This test will fail in subsequent PRs, this is intended as it will uncover bugs that would otherwise be hidden.

@Static-Codes

Copy link
Copy Markdown
Contributor Author

While definitely not ideal, the 40% failure in test coverage is something im actually looking forward to! It means that bugs that I was previously unaware of can now be addressed in the near future.

Unit Test Results

python3 tests/run_tests.py
Running Test #1
Test Description: Testing compatibility with gnupg using a supported legacy version of CMake (3.1)

Action 1/6: Cloning the repository from: https://github.com/gpg/gnupg

Action 2/6: Cleaning up existing CMakeLists.txt in gnupg

Action 3/6: Running auto2cmake.py for gnupg
Command: python3 /home/nerdy/repos/Non-Profit/Active/autocmake/main.py -d /home/nerdy/repos/Non-Profit/Active/autocmake/gnupg -v 3.1 -r

Action 4/6: Attempting to configure gnupg using CMake 3.1

SUCCESS: gnupg configured with CMake 3.1!

Action 5/6: Attempting to compile gnupg
Command: cmake --build /home/nerdy/repos/Non-Profit/Active/autocmake/gnupg_build_test

Command failed with return code: 2
[  0%] Building C object common/CMakeFiles/common.dir/agent-opt.c.o
[  1%] Building C object common/CMakeFiles/common.dir/asshelp.c.o

In file included from /home/nerdy/repos/Non-Profit/Active/autocmake/gnupg/common/asshelp.c:41:
/home/nerdy/repos/Non-Profit/Active/autocmake/gnupg/common/util.h:34:10: fatal error: gcrypt.h: No such file or directory
   34 | #include <gcrypt.h> /* We need this for the memory function protos. */
      |          ^~~~~~~~~~
compilation terminated.
gmake[2]: *** [common/CMakeFiles/common.dir/build.make:90: common/CMakeFiles/common.dir/asshelp.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:218: common/CMakeFiles/common.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

FAILURE: Unable to compile gnupg, exit code 2.

Action 6/6: Removing build artifacts associated with this test.

SUCCESS: Removed build artifacts associated with this test.


Running Test #2
Test Description: Testing compatibility with cpython, which caused issues in older releases of auto2cmake.

Action 1/6: Cloning the repository from: https://github.com/python/cpython

Action 2/6: Cleaning up existing CMakeLists.txt in cpython

Action 3/6: Running auto2cmake.py for cpython
Command: python3 /home/nerdy/repos/Non-Profit/Active/autocmake/main.py -d /home/nerdy/repos/Non-Profit/Active/autocmake/cpython -v 3.28.3 -r

Action 4/6: Attempting to configure cpython using CMake 3.28.3

SUCCESS: cpython configured with CMake 3.28.3!

Action 5/6: Attempting to compile cpython
Command: cmake --build /home/nerdy/repos/Non-Profit/Active/autocmake/cpython_build_test

SUCCESS: cpython compiled successfully!

Action 6/6: Removing build artifacts associated with this test.

SUCCESS: Removed build artifacts associated with this test.


Running Test #3
Test Description: Testing the version parsing logic against an unsupported version of CMake (2.7)

Action 1/6: Cloning the repository from: https://github.com/gpg/gnupg

Action 2/6: Cleaning up existing CMakeLists.txt in gnupg

Action 3/6: Running auto2cmake.py for gnupg
Command: python3 /home/nerdy/repos/Non-Profit/Active/autocmake/main.py -d /home/nerdy/repos/Non-Profit/Active/autocmake/gnupg -v 2.7 -r

SUCCESS: Test passed!


Running Test #4
Test Description: Testing the version parsing logic against an unreleased version of CMake (6.9)

Action 1/6: Cloning the repository from: https://github.com/gpg/gnupg

Action 2/6: Cleaning up existing CMakeLists.txt in gnupg

Action 3/6: Running auto2cmake.py for gnupg
Command: python3 /home/nerdy/repos/Non-Profit/Active/autocmake/main.py -d /home/nerdy/repos/Non-Profit/Active/autocmake/gnupg -v 6.9 -r

SUCCESS: Test passed!


Running Test #5
Test Description: Testing another large project recommended by Autotools users.

Action 1/6: Cloning the repository from: https://github.com/strongswan/strongswan

Action 2/6: Cleaning up existing CMakeLists.txt in strongswan

Action 3/6: Running auto2cmake.py for strongswan
Command: python3 /home/nerdy/repos/Non-Profit/Active/autocmake/main.py -d /home/nerdy/repos/Non-Profit/Active/autocmake/strongswan -v 3.28.3 -r

Action 4/6: Attempting to configure strongswan using CMake 3.28.3

SUCCESS: strongswan configured with CMake 3.28.3!

Action 5/6: Attempting to compile strongswan
Command: cmake --build /home/nerdy/repos/Non-Profit/Active/autocmake/strongswan_build_test

Command failed with return code: 2
[  8%] Building C object scripts/CMakeFiles/bin2array.dir/bin2array.c.o
[ 16%] Linking C executable bin2array
[ 16%] Built target bin2array
[ 25%] Building C object scripts/CMakeFiles/bin2sql.dir/bin2sql.c.o
[ 33%] Linking C executable bin2sql
[ 33%] Built target bin2sql
[ 41%] Building C object scripts/CMakeFiles/id2sql.dir/id2sql.c.o

/home/nerdy/repos/Non-Profit/Active/autocmake/strongswan/scripts/id2sql.c:19:10: fatal error: library.h: No such file or directory
   19 | #include <library.h>
      |          ^~~~~~~~~~~
compilation terminated.
gmake[2]: *** [scripts/CMakeFiles/id2sql.dir/build.make:76: scripts/CMakeFiles/id2sql.dir/id2sql.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:160: scripts/CMakeFiles/id2sql.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

FAILURE: Unable to compile strongswan, exit code 2.

Action 6/6: Removing build artifacts associated with this test.

SUCCESS: Removed build artifacts associated with this test.


Test #1: Failed
Test #2: Passed
Test #3: Passed
Test #4: Passed
Test #5: Failed




======================================
Test Statistics
======================================
Total Tests: 5
Passed Tests: 3
Failed Tests: 2

Success Rate: 60.0%
Failure Rate: 40.0%

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.

1 participant