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

fix unit tests on arch linux #604

Merged
merged 6 commits into from
Jan 6, 2025
Merged

Conversation

rhubert
Copy link
Contributor

@rhubert rhubert commented Dec 29, 2024

A series of small fixes and adjustments to get the unit tests working on arch linux based distributions using the latest versions of git, different hostname, latest java, ...

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.85%. Comparing base (d990c9c) to head (9d8f3fd).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #604   +/-   ##
=======================================
  Coverage   88.85%   88.85%           
=======================================
  Files          48       48           
  Lines       15463    15468    +5     
=======================================
+ Hits        13739    13744    +5     
  Misses       1724     1724           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/namespace-sandbox/namespace-sandbox.c Outdated Show resolved Hide resolved
pym/bob/scm/git.py Outdated Show resolved Hide resolved
@rhubert rhubert force-pushed the git-fixes branch 2 times, most recently from f0cfa1c to b538860 Compare January 1, 2025 20:23
src/namespace-sandbox/namespace-sandbox.c Outdated Show resolved Hide resolved
test/black-box/buildid-change/run.sh Outdated Show resolved Hide resolved
CreateTarget is called with a relative target directory. In case the
directory is the root-directory (`/`) the path passed to CreateTarget
is just an empty string which fails in `mkdir` with:

  src/namespace-sandbox/namespace-sandbox.c:471: cannot create :
  	No such file or directory

This happens for example on systems where the home directory of nobody in
/etc/passwd is `/`.
Make tests work on machines where the git init.defaultBranch is set to
something different than master.
GNU Inteutils and net-tools hostname implementations don't support `-A`.
Looks like this is available on debian only. Use the hostid tool instead.
If the java version is to new for the lastest jenkins release it refuses
to start:

[TEST]: Waiting for Jenkins to get ready...
Running with Java 23 from /usr/lib/jvm/java-23-openjdk, which is not yet fully supported.
Run the command again with the --enable-future-java flag to enable preview support for future Java versions.
Supported Java versions are: [17, 21]
See https://jenkins.io/redirect/java-support/ for more information.
The fix for CVE-2022-39253 ([1]) disallows file mode transfers for submodules.
Since (at least) our unit tests rely on file transfers allow it if file
protocol is used.

[1] https://www.cve.org/CVERecord?id=CVE-2022-39253
@jkloetzke jkloetzke merged commit c1146f8 into BobBuildTool:master Jan 6, 2025
11 checks passed
@jkloetzke
Copy link
Member

Thanks!

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