soda 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/SodaReporter.rb +49 -2
- metadata +4 -4
data/lib/SodaReporter.rb
CHANGED
@@ -394,11 +394,58 @@ class SodaReporter
|
|
394
394
|
tmp_logfile += "/"
|
395
395
|
tmp_logfile += File.basename("#{@log_filename}", ".tmp")
|
396
396
|
tmp_logfile += ".log"
|
397
|
-
File.rename(@log_filename, tmp_logfile)
|
397
|
+
# File.rename(@log_filename, tmp_logfile) # put back after hack!!!
|
398
|
+
NFSRenameHack(@log_filename, tmp_logfile)
|
399
|
+
|
398
400
|
@log_filename = tmp_logfile
|
399
|
-
|
400
401
|
end
|
401
402
|
|
403
|
+
###############################################################################
|
404
|
+
# NFSRenameHack -- hack!!!
|
405
|
+
#
|
406
|
+
# This is a total hack because of the very lame ass way hudson was setup
|
407
|
+
# to run soda tests using an nfs mount as a writing point for test
|
408
|
+
# results!!! This hack will be taken out as soon as hudson is updated.
|
409
|
+
#
|
410
|
+
###############################################################################
|
411
|
+
def NFSRenameHack(old_file, new_file)
|
412
|
+
err = false
|
413
|
+
count = 0
|
414
|
+
|
415
|
+
while (err != true)
|
416
|
+
err = @logfile.closed?()
|
417
|
+
count += 1
|
418
|
+
sleep(1)
|
419
|
+
break if (count > 20)
|
420
|
+
end
|
421
|
+
|
422
|
+
tmp_log = File.open(old_file, "r")
|
423
|
+
new_log = File.new(new_file, "w+")
|
424
|
+
line = nil
|
425
|
+
while (line = tmp_log.gets)
|
426
|
+
new_log.write(line)
|
427
|
+
end
|
428
|
+
tmp_log.close()
|
429
|
+
new_log.close()
|
430
|
+
|
431
|
+
sleep(1)
|
432
|
+
|
433
|
+
is_deleted = false
|
434
|
+
for i in 0..30
|
435
|
+
begin
|
436
|
+
File.unlink(old_file)
|
437
|
+
is_deleted = true
|
438
|
+
rescue Exception => e
|
439
|
+
print "(!)Failed calling delete on file: '#{old_file}'!\n"
|
440
|
+
is_deleted = false
|
441
|
+
ensure
|
442
|
+
end
|
443
|
+
|
444
|
+
break if (is_deleted)
|
445
|
+
sleep(1)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
402
449
|
###############################################################################
|
403
450
|
# log -- Method
|
404
451
|
# This method will log soda message to both stdout & the report's log file.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Trampus Richmond
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-15 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|