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

Document and test env vars a bit better #6827

Merged
merged 1 commit into from Apr 3, 2022

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Mar 23, 2020

Since this PR was first opened, just about everything it was supposed to do already happened, so now it is just refining the docs and tests for existing behavior.

run_unittests.py Outdated
Comment on lines 6339 to 6516
env = {
'CC_FOR_BUILD': '"' + os.path.join(testdir, 'build_wrapper.py') + '"',
'CC': '"' + os.path.join(testdir, 'host_wrapper.py') + '"',
}
crossfile = tempfile.NamedTemporaryFile(mode='w')
crossfile.write('''[binaries]
c = ['{0}']
'''.format(os.path.join(testdir, 'host_wrapper.py')))
crossfile.write('')
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have to change this test, as this is a non-breaking change. However, doing so makes it less redundant with the previous test, which exclusive uses the native and cross files with no environment variables.

@Ericson2314
Copy link
Member Author

@ePirat Let's not forget about this :).

Copy link
Contributor

@ePirat ePirat left a comment

Choose a reason for hiding this comment

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

Sounds like a very good change to me, to be compatible with the existing conventions for these variables.

docs/markdown/howtox.md Outdated Show resolved Hide resolved
Ericson2314 added a commit to Ericson2314/nixpkgs that referenced this pull request Apr 28, 2020
See comment in code and the PR it references,
mesonbuild/meson#6827, for details.

We can remove entries from the cross file because they will be gotten
from env vars now.
mesonbuild/envconfig.py Outdated Show resolved Hide resolved
@Ericson2314 Ericson2314 changed the title Naturally use env vars a bit more to match Autoconf Document and test env vars a bit better Apr 2, 2022
@codecov
Copy link

codecov bot commented Apr 2, 2022

Codecov Report

Merging #6827 (d6d420d) into master (2c4c7f6) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #6827      +/-   ##
==========================================
- Coverage   66.16%   66.12%   -0.04%     
==========================================
  Files         406      406              
  Lines       86660    86660              
  Branches    19144    19144              
==========================================
- Hits        57335    57307      -28     
- Misses      24915    24933      +18     
- Partials     4410     4420      +10     
Impacted Files Coverage Δ
mesonbuild/scripts/vcstagger.py 87.50% <0.00%> (-4.17%) ⬇️
mesonbuild/dependencies/ui.py 68.45% <0.00%> (-1.35%) ⬇️
mesonbuild/dependencies/dev.py 65.24% <0.00%> (-1.07%) ⬇️
mesonbuild/dependencies/cuda.py 62.01% <0.00%> (-0.97%) ⬇️
mesonbuild/compilers/detect.py 55.17% <0.00%> (-0.93%) ⬇️
mesonbuild/dependencies/base.py 85.42% <0.00%> (-0.59%) ⬇️
mesonbuild/backend/ninjabackend.py 85.87% <0.00%> (-0.31%) ⬇️
mesonbuild/interpreter/interpreter.py 84.06% <0.00%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2c4c7f6...d6d420d. Read the comment docs.

@dcbaker
Copy link
Member

dcbaker commented Apr 3, 2022

Updating the tests to help with env2cross seems like a great idea

@dcbaker dcbaker merged commit 01a7aa0 into mesonbuild:master Apr 3, 2022
@Ericson2314 Ericson2314 deleted the env-flags-more branch April 3, 2022 19:36
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

4 participants