70f5ad4d3afb51df8cd4c1b40dd75a6a0d0ee915 braney Sat Jan 29 08:13:53 2022 -0800 require that chromAliasSetup be called at init time to avoid potential thread race conditions diff --git src/hg/lib/tests/customTrackTester.c src/hg/lib/tests/customTrackTester.c index 3f0bef9..35be9ac 100644 --- src/hg/lib/tests/customTrackTester.c +++ src/hg/lib/tests/customTrackTester.c @@ -1,26 +1,27 @@ /* customTrackTester - test custom tracks functions in library */ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "obscure.h" #include "options.h" #include "portable.h" #include "hdb.h" #include "customFactory.h" +#include "chromAlias.h" void usage() /* explain usage and exit */ { errAbort( "customTrackTester - test program for custom tracks library\n\n" "usage:\n" " customTrackTester [options] task [args...]\n" " where task/args can be:\n" " parse inputFile [trashFile]\n" " check outFile expectedFile\n" "options:\n" " -db= - set database (defaults to %s)\n", hDefaultDb() ); @@ -96,30 +97,31 @@ char *newVal = NULL; if ((newVal = (char *)hashFindVal(newSettings, setting)) == NULL) errAbort("ct %s setting %s not found in new", ct->tdb->track, setting); if (differentString(newVal, expVal)) errAbort("ct %s setting %s differs from expected: %s should be %s", ct->tdb->track, setting, newVal, expVal); } } } int main(int argc, char *argv[]) { optionInit(&argc, argv, optionSpecs); char *db = optionVal("db", hDefaultDb()); +chromAliasSetup(db); if (argc < 2) usage(); char *task = argv[1]; if (sameString(task, "parse")) { if (argc < 3) usage(); char *trashFile = NULL; char *inFile = argv[2]; if (argc > 3) trashFile = argv[3]; parseCustomTracks(db, inFile, trashFile); } else if (sameString(task, "check")) {