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 file locking to support parallel runs. #427

Merged
merged 34 commits into from
Jan 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
da8ba91
Add file locking to support parallel runs.
PercentBoat4164 Nov 27, 2022
6abda4b
Fixed formatting.
PercentBoat4164 Nov 28, 2022
218c079
Prevent double locking file.
PercentBoat4164 Nov 28, 2022
ea6411f
Fix SegFault from test 2.
PercentBoat4164 Nov 28, 2022
665ef68
Remove unnecessary debugging messages.
PercentBoat4164 Nov 28, 2022
f4ad1d6
Lock the package directory rather than the cache directory.
PercentBoat4164 Nov 29, 2022
d657584
Lock the version specific cache entry rather than the package specifi…
PercentBoat4164 Nov 29, 2022
773228e
Remove unnecessary arguments in conditional statements.
PercentBoat4164 Nov 29, 2022
3ecd96a
Change back to locking entire cache directory.
PercentBoat4164 Nov 29, 2022
83a4a51
Only check CPM_HAS_CACHE_LOCK.
PercentBoat4164 Nov 29, 2022
b2fba4e
Lock on a per-package basis rather than the entire cache.
PercentBoat4164 Dec 1, 2022
9d72172
Clean up the locked file.
PercentBoat4164 Dec 1, 2022
2250917
Unlock then remove to fix Windows.
PercentBoat4164 Dec 1, 2022
9f1747f
Merge branch 'cpm-cmake:master' into master
PercentBoat4164 Dec 6, 2022
9f4a952
Specify use of cmake.lock as the lock file.
PercentBoat4164 Dec 6, 2022
9660df6
Merge branch 'master' into master
TheLartians Jan 10, 2023
5ec1db4
Merge branch 'cpm-cmake:master' into master
PercentBoat4164 Jan 10, 2023
579f272
- Changed CPM_HAS_CACHE_LOCK to ${CPM_ARGS_NAME}_CPM_HAS_CACHE_LOCK.
PercentBoat4164 Jan 10, 2023
85f3ebb
Add unit test.
PercentBoat4164 Jan 10, 2023
70e4f57
Actually test if resulting git cache is clean in unit test.
PercentBoat4164 Jan 11, 2023
b2eb097
- Added comments
PercentBoat4164 Jan 11, 2023
937abb1
convert parallelism test to integration test
TheLartians Jan 24, 2023
a5a33b8
remove comment
TheLartians Jan 24, 2023
82c05f5
- Removed now unnecessary variable.
PercentBoat4164 Jan 25, 2023
0397a72
Forgot to change variable name.
PercentBoat4164 Jan 25, 2023
dd2ef70
Add similar changes to the missed section.
PercentBoat4164 Jan 25, 2023
0bc1f2d
Fixed formatting.
PercentBoat4164 Jan 25, 2023
c031a3d
Unlock the file, but do not delete it.
PercentBoat4164 Jan 25, 2023
88592ef
Only unlock the file if it exists.
PercentBoat4164 Jan 25, 2023
42ef7b6
Changed cache.cmake test to ignore non-directory entries.
PercentBoat4164 Jan 25, 2023
bc00dd7
Integration test lib make_project:
iboB Jan 26, 2023
dce53a1
- Moved checks to function.
PercentBoat4164 Jan 26, 2023
5789a87
- Fix formatting
PercentBoat4164 Jan 26, 2023
dffafed
Switch to snake case.
PercentBoat4164 Jan 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/unit/cache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ execute_process(
assert_equal(${ret} "0")
assert_exists("${CPM_SOURCE_CACHE_DIR}/fibonacci")

assertCacheDirectoryCount("${CPM_SOURCE_CACHE_DIR}/fibonacci/*" 1)
assertcachedirectorycount("${CPM_SOURCE_CACHE_DIR}/fibonacci/*" 1)
PercentBoat4164 marked this conversation as resolved.
Show resolved Hide resolved

# Update dependency and keep CPM_SOURCE_CACHE

Expand All @@ -61,7 +61,7 @@ update_cmake_lists()
execute_process(COMMAND ${CMAKE_COMMAND} ${TEST_BUILD_DIR} RESULT_VARIABLE ret)
assert_equal(${ret} "0")

assertCacheDirectoryCount("${CPM_SOURCE_CACHE_DIR}/fibonacci/*" 2)
assertcachedirectorycount("${CPM_SOURCE_CACHE_DIR}/fibonacci/*" 2)

# Clear cache and update

Expand Down