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

Remove dependency of make version_test/unit-test/bash_tests on bash #1274

Closed
clanmills opened this issue Sep 4, 2020 · 5 comments
Closed
Assignees
Labels
testing Anything related to the tests and their infrastructure
Milestone

Comments

@clanmills
Copy link
Collaborator

clanmills commented Sep 4, 2020

After #1257 is merged, we can now move rapidly to remove the last vestiges of bash in the test suite.

Currently the commands in the build directory use bash to run different parts of the test suite.

bash cmd.exe
$ make bash_tests cmake --build . --config Release --target bash_tests
$ make unit_test cmake --build . --config Release --target unit_test
$ make version_test cmake --build . --config Release --target bash_tests

Remove the dependency on bash. In #1257, you are running the new bash_tests from python. Let's give similar treatment to unit_test and version_test.

Please prepare the PR for v0.27-maintenance. We'll have to update README.md (and possibly README-CONAN.md) to match the code. I'll give you those changes as part of the PR review.

There is no plan yet to adopt #1257 and other python test enhancements into 'master'.

We've had an offer from @kmilos to help test this on MinGW/msys2. Thank You, @kmilos. I'll get GitHub to invite you to join Team Exiv2 and I will add you to the assignees for this issue and subsequent PR. I won't dump work on @kmilos unless he volunteers for other issues.

@clanmills clanmills added the testing Anything related to the tests and their infrastructure label Sep 4, 2020
@clanmills clanmills added this to the v0.27.4 milestone Sep 4, 2020
@clanmills clanmills assigned clanmills and unassigned LeoHsiao1 Sep 29, 2020
@clanmills clanmills removed their assignment Dec 15, 2020
@LeoHsiao1
Copy link
Contributor

Sorry, I still don't know about unit_test and version_test.
Are we going to rewrite this part of the content in the Makefile?

version_test \
unit_test    :
	@echo
	@echo ---- Running $@ ----
	@echo
	-@./$@.sh

Or rewrite the test cases named version_test.py and unit_test.py?

@clanmills
Copy link
Collaborator Author

I think running unit_test from python is a couple of lines on python and version_test is one line of python!

make unit_test

$ cmake .. -DEXIV2_BUILD_UNIT_TESTS=1
$ make unit_tests        # create the excitable bin/unit_tests
$ make unit_test          # runs the executable bin/unit_tests  

Today, it runs some bash code:

1081 rmills@rmillsm1:~/gnu/github/exiv2/0.27-maintenance/build $ cat ../test/unit_test.sh 
#!/usr/bin/env bash
# driver for $ make unit_test

( source ./functions.source ; runTest unit_tests --gtest_color=no 2>&1 | grep -v "Warning: Unsupported .... format" )

# That's all Folks!
##

Can you get $ make unit_test run something like python3 runner something.py And something.py should be run LAST by $ python3 runner.py

make version_test

Every build of exiv2 command-line program supports options --verbose --version. There's a little bash magic to filter/reduce the output from the command in the test suite. I think you only need to call:

system_tests.BT.verbose_version(True).

You'll do this easily when you understand what I'd like you to do!

Remember the aim. We want bash out of the code base. Gone. Unix users will run the test suite with command such as:

$ cd build
$ make tests
$ make version_test  etc....

msvc developers will use:

$ cd build
$ cmake --build . --target tests
$ cmake --build . --target version_test etc...

Both those command execute python3 runner.py [magic.py] to do the work.

@LeoHsiao1
Copy link
Contributor

Oh oh, I won't have time to finish it this weekend.

@clanmills
Copy link
Collaborator Author

That's fine. I'm going to release Exiv2 v0.27.4 RC1 this week. We are two weeks ahead of schedule.

Code freeze/RC2 is scheduled for 2021-04-30. However it would be very helpful if you could complete this in March and we arrive at Code Freeze in Early April.

@clanmills clanmills modified the milestones: v0.27.4, v0.28 Mar 16, 2021
@clanmills clanmills assigned clanmills and unassigned LeoHsiao1 Mar 17, 2021
@clanmills clanmills modified the milestones: v0.28, v0.27.4 Mar 17, 2021
@clanmills
Copy link
Collaborator Author

Closed by #1495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Anything related to the tests and their infrastructure
Projects
None yet
Development

No branches or pull requests

2 participants