summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-09-17 09:30:59 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2015-09-17 09:30:59 +0200
commit38eb9f05155c2584b326ba82f7cb99919b86c86a (patch)
tree1227061482ae19c29ac3cc378e557c4d198bdd8c
parent9d39a3de85ddde5d3271b17e793291fcecc88cff (diff)
downloadcssh-38eb9f05155c2584b326ba82f7cb99919b86c86a.tar.gz
cssh-38eb9f05155c2584b326ba82f7cb99919b86c86a.tar.bz2
wrong location for 'P' option (ggo.in, not ggo)
more fine grained testing of progress bar
-rw-r--r--src/options.ggo.in4
-rw-r--r--tests/progressbartest.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/src/options.ggo.in b/src/options.ggo.in
index c667572..8a90a72 100644
--- a/src/options.ggo.in
+++ b/src/options.ggo.in
@@ -35,3 +35,7 @@ section "SCP options"
option "recursive" r
"Copy files and directories recursively"
optional
+
+ option "progress-bar" P
+ "Show progress bars during copy"
+ optional
diff --git a/tests/progressbartest.c b/tests/progressbartest.c
index 9459578..7ff4a91 100644
--- a/tests/progressbartest.c
+++ b/tests/progressbartest.c
@@ -4,6 +4,8 @@
#include <stdlib.h>
#include <stdio.h>
+#define NOF_TESTS 100000
+
int main( void )
{
cssh_progressbar_t p1;
@@ -11,15 +13,15 @@ int main( void )
cssh_progressbar_pool_t pool;
create_progressbar_pool( &pool, 2 );
- create_progressbar( &p1, 0, 100, 100, "[Running on host %s]:", "host1" );
- create_progressbar( &p2, 0, 100, 100, "[Running on host %s]:", "host2" );
+ create_progressbar( &p1, 0, NOF_TESTS, 100, "[Running on host %s]:", "host1" );
+ create_progressbar( &p2, 0, NOF_TESTS, 100, "[Running on host %s]:", "host2" );
append_progressbar_to_pool( &pool, &p1 );
append_progressbar_to_pool( &pool, &p2 );
- for( unsigned int i = 0; i < 100; i++ ) {
+ for( unsigned int i = 0; i < NOF_TESTS; i++ ) {
set_value_of_progressbar( &p1, i );
- set_value_of_progressbar( &p2, 100 - i );
+ set_value_of_progressbar( &p2, NOF_TESTS - i );
redraw_progressbars( &pool );
- cssh_msleep( 100 );
+ //cssh_msleep( 10 );
}
free_progressbar( &p1 );