From a8befb700d2915a08507fad4f472efcaa41f83d5 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 19 Jun 2010 09:30:35 +0200 Subject: [PATCH] test: Split test to subtests --- build/aquosa/tests/negotiation.cc | 17 ++++++++++++----- build/aquosa/tests/t0001-negotiation.sh | 3 +++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/build/aquosa/tests/negotiation.cc b/build/aquosa/tests/negotiation.cc index f4cc5bfd..d4ce749c 100644 --- a/build/aquosa/tests/negotiation.cc +++ b/build/aquosa/tests/negotiation.cc @@ -23,14 +23,14 @@ int b[N] = { 10, 20, 30 }; // printf(" -l, --loglevel |=,...\n"); // } +int ret; +frsh_contract_t contract[N]; +frsh_vres_id_t vres[N]; +frsh_rel_time_t budget, period, deadline; +int i; WVTEST_MAIN("basic negotiation") { - int ret; - frsh_contract_t contract[N]; - frsh_vres_id_t vres[N]; - frsh_rel_time_t budget, period, deadline; - int i; // char opt; // while ((opt = getopt_long(argc, argv, "l:", &long_opts[0], NULL)) != EOF) { @@ -76,6 +76,10 @@ WVTEST_MAIN("basic negotiation") ret = WVFRSH(frsh_contract_negotiate(&contract[i], &vres[i])); if (ret) exit(1); } +} + +WVTEST_MAIN("renegotiation") +{ for (i=0; i<2 /*N*/; i++) { // FIXME: There is a bug on the test - the 3rd renegotiation fails budget = fosa_msec_to_rel_time(2*b[i]); @@ -90,7 +94,10 @@ WVTEST_MAIN("basic negotiation") ret = WVFRSH(frsh_contract_renegotiate_sync(&contract[i], vres[i])); if (ret) exit(1); } +} +WVTEST_MAIN("cancelation") +{ /* Cancel N contracts */ for (i=0; i