WL#5140: fit mysys/test_ programs into the unit test framework
Affects: Server-9.x — Status: Un-Assigned — Priority: Medium
In mysys (in mysys/tests in 6.0), there are a few executables that you can compile: [mysys $] grep ^test_ Makefile.am test_bitmap$(EXEEXT): my_bitmap.c $(LIBRARIES) test_priority_queue$(EXEEXT): queues.c $(LIBRARIES) test_thr_alarm$(EXEEXT): thr_alarm.c $(LIBRARIES) test_thr_lock$(EXEEXT): thr_lock.c $(LIBRARIES) test_vsnprintf$(EXEEXT): my_vsnprintf.c $(LIBRARIES) test_io_cache$(EXEEXT): mf_iocache.c $(LIBRARIES) test_dir$(EXEEXT): test_dir.c $(LIBRARIES) test_charset$(EXEEXT): test_charset.c $(LIBRARIES) test_gethwaddr$(EXEEXT): my_gethwaddr.c $(LIBRARIES) test_base64$(EXEEXT): base64.c $(LIBRARIES) ("make test_bitmap" etc). As those tests are not automatically built, their build gets accidentally and silently broken over time. Those which still build may fail, as they are not automatically run. Plan to solve this: - if possible, split each test in a test file linking with libmysys (instead of the current way which is to have the test's main() in the same file as the tested code, see main() at the end of thr_lock.c) - move test files to top/unittest/mysys - make sure they compile automatically and are run by "make test-unit" and pass - possibly move them to top/mysys/unittest (just like engine unit tests are expected to be in top/storage/<engine>/unittest)
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.