Skip to content

test(zstd): Fix 'zstd' extraction error in test#4651

Merged
niheaven merged 5 commits intodevelopfrom
fix-test-zstd
Jan 13, 2022
Merged

test(zstd): Fix 'zstd' extraction error in test#4651
niheaven merged 5 commits intodevelopfrom
fix-test-zstd

Conversation

@niheaven
Copy link
Copy Markdown
Member

@niheaven niheaven commented Jan 12, 2022

Fix Appveyor error caused by wrong zstd.exe extraction.

Description

  • Update zstd to v1.5.1 and change its 7z extraction param (This is why CI cannot find zstd)
  • Fix Mock function in zstd test cases (This is why nested zstd test fails)
  • Some unrelated tweaks
    • Install helper and set EnvVars on demand (Move from init.ps1 to test.ps1)
    • Move helper EnvVars from appveyor.yml to test.ps1
    • Change condition of Mock Get-AppFilePath to CI_WINDOWS so developers could simulate test in CI by setting $env:CI_WINDOWS = $true and modifying the helper downloading part of test.ps1 file

Motivation and Context

Relates to #4608 (comment)

How Has This Been Tested?

https://ci.appveyor.com/project/niheaven/scoop/builds/42177522/job/l8b7kyla9deyiohx

Checklist:

  • I have read the Contributing Guide.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@rashil2000 rashil2000 requested a review from chawyehsu January 12, 2022 18:15
Comment thread test/bin/test.ps1 Outdated
Comment thread test/Scoop-Decompress.Tests.ps1 Outdated
@niheaven
Copy link
Copy Markdown
Member Author

GitHub recommends _PATH suffix that point to a location on the filesystem (https://docs.github.com/en/actions/learn-github-actions/environment-variables#naming-conventions-for-environment-variables), so modify lessmsi, innounp and zstd environment variable names.

@chawyehsu
Copy link
Copy Markdown
Member

GitHub recommends _PATH suffix that point to a location on the filesystem (https://docs.github.com/en/actions/learn-github-actions/environment-variables#naming-conventions-for-environment-variables), so modify lessmsi, innounp and zstd environment variable names.

How about adding a SCOOP_ prefix for them.

@niheaven
Copy link
Copy Markdown
Member Author

How about adding a SCOOP_ prefix for them.

Just likes SCOOP_HELPERS_PATH? i.e. SCOOP_LESSMSI_PATH, SCOOP_INNOUNP_PATH and SCOOP_ZSTD_PATH?

@chawyehsu
Copy link
Copy Markdown
Member

Yes

@niheaven
Copy link
Copy Markdown
Member Author

niheaven commented Jan 13, 2022

Okay, I'll add them. Done.

@niheaven niheaven merged commit d7fb97f into develop Jan 13, 2022
@niheaven niheaven deleted the fix-test-zstd branch January 13, 2022 08:32
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
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.

2 participants