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

Add SNAPCRAFT_PROJECT_DIR environment variable. #2534

Merged
merged 3 commits into from
Apr 16, 2019

Conversation

tonysimpson
Copy link
Contributor

New variable pointing to the project directory, the directory
the snapcraft command was run from. This variable should be correct
regardless of what build environment (container or host) the build
is running in. This allows easy reference to supporting script or
other resources inside snapcraft.yaml overrides sections.

Fixes https://bugs.launchpad.net/snapcraft/+bug/1824417

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh tests/unit?

New variable pointing to the project directory, the directory
the snapcraft command was run from. This variable should be correct
regardless of what build environment (container or host) the build
is running in. This allows easy reference to supporting script or
other resources inside snapcraft.yaml overrides sections.

Fixes https://bugs.launchpad.net/snapcraft/+bug/1824417
@@ -175,7 +175,7 @@ def test_tab_in_yaml(self):
self.assertThat(
raised.message,
Equals(
"found a tab character that violate intendation on line 5, column 1"
"found a tab character that violate indentation on line 5, column 1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

ha, the test failure is due to this change, the typo is in the actual product, feel free to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's weird the tests pass for me with this change? I'll investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was due to changes in libyaml - committed fix

Forgot to run "./runtests.sh static" on prev commit
@codecov-io
Copy link

Codecov Report

Merging #2534 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2534      +/-   ##
==========================================
- Coverage    89.1%   89.09%   -0.01%     
==========================================
  Files         201      201              
  Lines       13658    13658              
  Branches     2068     2068              
==========================================
- Hits        12170    12169       -1     
  Misses       1050     1050              
- Partials      438      439       +1
Impacted Files Coverage Δ
snapcraft/internal/project_loader/_env.py 95.74% <ø> (ø) ⬆️
snapcraft/internal/elf.py 80.71% <0%> (-0.36%) ⬇️

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 029e2d0...16befd2. Read the comment docs.

@sergiusens
Copy link
Collaborator

A todo or bug to add a proper integration tests in tests/spread/build-providers would be nice to follow-up with (depends on snapd 2.38 and implementation using the new "snap-retrieval" API)

@sergiusens sergiusens merged commit 3d4483d into canonical:master Apr 16, 2019
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.

3 participants