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

Simplify test case in xspec-bat.cmd (ifdef) #286

Merged
merged 96 commits into from
Dec 4, 2018

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Aug 14, 2018

This pull request derives from #285. So needs to be handled after that.


To skip some test cases in the batch script, you have to write if and call :skip and manage the scope of ( and ).
This pull request simplifies it. Just write @ifdef and it will be expanded as batch script.

With this pull request and #285, the batch script decreases cleanly: 718 lines to 475 lines

On AppVeyor, you can see all tests run and some are skipped appropriately. With a temporary commit (b2bf80e), you can see test failures are still detected.

Although the diff looks large due to indentation, this pull request is in fact a simple change. You can confirm it easily:

  1. Run xspec-bat.cmd using the current master.
  2. Move xspc-bat~TEMP~.cmd somewhere and keep it.
  3. Run xspec-bat.cmd using this pull request.
  4. Compare xspc-bat~TEMP~.cmd with the one you kept. They should look almost the same.

…185_cumulative

# Conflicts:
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…185_cumulative

# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
…185_cumulative

# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec-bat/README.md
#	test/xspec-bat/stub.cmd
@cirulls cirulls self-requested a review December 4, 2018 12:51
# Conflicts:
#	test/xspec-bat/collection.xml
#	test/xspec-bat/collection.xsd
#	test/xspec-bat/generate.xsl
Copy link
Member

@cirulls cirulls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I reviewed it as follows:

  • I followed the instructions to create a diff as in the previous pull request and checked that all the tests were covered in the new implementation.
  • I ran the test suite locally, all tests are green. I intentionally broke a test and the test failure was correctly picked up.
  • I inspected the link provided and the code. It's definitely easier to follow what the tests does via the attribute ifdef and the use of environment variables.

I'm merging this into master.

@cirulls cirulls merged commit f58ef3d into xspec:master Dec 4, 2018
@AirQuick AirQuick deleted the case-ifdef branch December 4, 2018 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants