SQLite

Check-in [f489bc3116]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the command-line parsing for threadtest3 so that tests are run in the order they are specified on the command-line.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f489bc31165f043dc10570e6c1250a292673660e
User & Date: drh 2014-12-31 18:28:59.230
Context
2014-12-31
18:55
Change threadtest3.c so that SQLITE_SCHEMA returns result in warnings not hard errors. Add the Darwin-x86_64 platform to releasetest.tcl. (check-in: b09a139c9e user: drh tags: trunk)
18:28
Update the command-line parsing for threadtest3 so that tests are run in the order they are specified on the command-line. (check-in: f489bc3116 user: drh tags: trunk)
18:25
Add a missing sqlite3_close() call to threadtest3.c. (check-in: a65a44f3ff user: dan tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/threadtest3.c.
1443
1444
1445
1446
1447
1448
1449
1450
1451


1452
1453
1454
1455
1456




1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
















1471
1472
1473
1474
1475
1476
1477
1443
1444
1445
1446
1447
1448
1449


1450
1451
1452
1453
1454


1455
1456
1457
1458














1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481







-
-
+
+



-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








    { create_drop_index_1, "create_drop_index_1", 10000 },
    { lookaside1,          "lookaside1", 10000 },
    { vacuum1,             "vacuum1", 10000 },
    { stress1,             "stress1", 10000 },
    { stress2,             "stress2", 60000 },
  };

  int i;
  static char *substArgv[] = { 0, "*", 0 };
  int i, iArg;
  int nTestfound = 0;

  sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
  sqlite3_config(SQLITE_CONFIG_MULTITHREAD);

  if( argc<2 ){
    argc = 2;
    argv = substArgv;
  }
  for(i=0; i<sizeof(aTest)/sizeof(aTest[0]); i++){
    char const *z = aTest[i].zTest;
    if( argc>1 ){
      int iArg;
      for(iArg=1; iArg<argc; iArg++){
        if( 0==sqlite3_strglob(argv[iArg], z) ) break;
      }
      if( iArg==argc ) continue;
    }

    printf("Running %s for %d seconds...\n", z, aTest[i].nMs/1000);
    fflush(stdout);
    aTest[i].xTest(aTest[i].nMs);
    nTestfound++;
  for(iArg=1; iArg<argc; iArg++){
    for(i=0; i<sizeof(aTest)/sizeof(aTest[0]); i++){
      if( sqlite3_strglob(argv[iArg],aTest[i].zTest)==0 ) break;
    }
    if( i>=sizeof(aTest)/sizeof(aTest[0]) ) goto usage;   
  }
  for(iArg=1; iArg<argc; iArg++){
    for(i=0; i<sizeof(aTest)/sizeof(aTest[0]); i++){
      char const *z = aTest[i].zTest;
      if( sqlite3_strglob(argv[iArg],z)==0 ){
        printf("Running %s for %d seconds...\n", z, aTest[i].nMs/1000);
        fflush(stdout);
        aTest[i].xTest(aTest[i].nMs);
        nTestfound++;
      }
    }
  }
  if( nTestfound==0 ) goto usage;

  printf("%d errors out of %d tests\n", nGlobalErr, nTestfound);
  return (nGlobalErr>0 ? 255 : 0);

 usage: