Files
chromebrew/tests/test_crew_lockfile.rb
Satadru Pramanik, DO, MPH, MEng ddeeef5ad4 Refactor upload (#11821)
* Add crew lockfile implementation.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Refactor crew upload, and add usage of lockfiles.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Adjust crew and add test.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* Add more lightred.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2025-04-25 21:39:18 +00:00

17 lines
309 B
Ruby
Executable File

#!/usr/bin/env ruby
require_relative '../lib/crew_lockfile'
puts 'Before lock:'
system 'ls test.lock'
lockfile = CrewLockfile.new 'test.lock'
lockfile.debug = true
begin
lockfile.lock
puts 'During lock:'
system 'ls test.lock'
p 42
ensure
lockfile.unlock
end
puts 'After lock:'
system 'ls test.lock'