diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2017-01-31 09:49:12 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2017-01-31 09:49:12 +0000 |
commit | 78b368082d129424b02387a89f848320e4a466bf (patch) | |
tree | dafba896943932f0a6245afb6d6d11c00db839e6 | |
parent | c68fe975ab4b47436bd90fa701b83a78793b0f32 (diff) |
Adds a makefile target to run tests
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | test/tc_byteback_snapshot.rb | 8 |
2 files changed, 8 insertions, 5 deletions
@@ -10,8 +10,11 @@ docs: man/byteback-prune.man man/byteback-restore.man man/byteback-backup.man # To be written # man/byteback-snapshot.man man/byteback-setup-client.man man/byteback-setup-client-receive.man man/byteback-receive.man +test: + ruby test/tc_*.rb + clean: $(RM) man/*.man -.PHONY: clean docs all +.PHONY: clean docs all test diff --git a/test/tc_byteback_snapshot.rb b/test/tc_byteback_snapshot.rb index 87b6409..6101371 100644 --- a/test/tc_byteback_snapshot.rb +++ b/test/tc_byteback_snapshot.rb @@ -58,7 +58,7 @@ class SnapshotTest < Test::Unit::TestCase if biggest_offset.nil? or offsets.max > biggest_offset biggest_offset = offsets.max else - puts "Oldest backup with space for #{limit} backups is #{offsets.max} days: #{offsets.join(", ")}" + puts "Oldest backup with space for #{limit} backups is #{offsets.max} days: #{offsets.join(", ")}" if $VERBOSE break end @@ -70,7 +70,7 @@ class SnapshotTest < Test::Unit::TestCase end # - # This run the same test as above, execpt with 3 hosts all competeing for space + # This run the same test as above, execpt with 3 hosts all competing for space # def test_sort_by_importance_with_multiple_hosts start = Time.now @@ -106,7 +106,7 @@ class SnapshotTest < Test::Unit::TestCase if biggest_offset.nil? or offsets.max > biggest_offset biggest_offset = offsets.max else - puts "Oldest backup with space for #{limit} backups and 3 hosts is #{offsets.max} days: #{offsets.join(", ")}" + puts "Oldest backup with space for #{limit} backups and 3 hosts is #{offsets.max} days: #{offsets.join(", ")}" if $VERBOSE break end @@ -154,7 +154,7 @@ class SnapshotTest < Test::Unit::TestCase day += 1 now += 86400 end - puts "Oldest backup with space for #{limit} backups is #{offsets.max} days: #{offsets.join(", ")}" + puts "Oldest backup with space for #{limit} backups is #{offsets.max} days: #{offsets.join(", ")}" if $VERBOSE end end |