foundationdb/tests/CMakeLists.txt

259 lines
13 KiB
CMake

include(AddFdbTest)
# We need some variables to configure the test setup
set(ENABLE_BUGGIFY ON CACHE BOOL "Enable buggify for tests")
set(RUN_IGNORED_TESTS OFF CACHE BOOL "Run tests that are marked for ignore")
set(TEST_KEEP_LOGS "FAILED" CACHE STRING "Which logs to keep (NONE, FAILED, ALL)")
set(TEST_KEEP_SIMDIR "NONE" CACHE STRING "Which simfdb directories to keep (NONE, FAILED, ALL)")
set(TEST_AGGREGATE_TRACES "NONE" CACHE STRING "Create aggregated trace files (NONE, FAILED, ALL)")
set(TEST_LOG_FORMAT "xml" CACHE STRING "Format for test trace files (xml, json)")
set(TEST_INCLUDE ".*" CACHE STRING "Include only tests that match the given regex")
set(TEST_EXCLUDE ".^" CACHE STRING "Exclude all tests matching the given regex")
# for the restart test we optimally want to use the last stable fdbserver
# to test upgrades
if(WITH_PYTHON)
find_program(OLD_FDBSERVER_BINARY
fdbserver
HINTS /usr/sbin /usr/libexec /usr/local/sbin /usr/local/libexec)
if(OLD_FDBSERVER_BINARY)
message(STATUS "Use old fdb at ${OLD_FDBSERVER_BINARY}")
else()
set(fdbserver_location ${CMAKE_BINARY_DIR}/bin/fdbserver)
set(OLD_FDBSERVER_BINARY ${fdbserver_location} CACHE FILEPATH "Old fdbserver binary" FORCE)
message(WARNING "\
No old fdbserver binary found - using ${fdbserver_location} \
It is recommended to install the current stable version from https://www.foundationdb.org/download/ \
Or provide a path to another fdbserver")
endif()
set(TestRunner "${PROJECT_SOURCE_DIR}/tests/TestRunner/TestRunner.py")
configure_file(${PROJECT_SOURCE_DIR}/tests/CTestCustom.ctest ${PROJECT_BINARY_DIR}/CTestCustom.ctest @ONLY)
configure_testing(TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
ERROR_ON_ADDITIONAL_FILES
IGNORE_PATTERNS ".*/CMakeLists.txt")
add_fdb_test(TEST_FILES AsyncFileCorrectness.txt UNIT IGNORE)
add_fdb_test(TEST_FILES AsyncFileMix.txt UNIT IGNORE)
add_fdb_test(TEST_FILES AsyncFileRead.txt UNIT IGNORE)
add_fdb_test(TEST_FILES AsyncFileReadRandom.txt UNIT IGNORE)
add_fdb_test(TEST_FILES AsyncFileWrite.txt UNIT IGNORE)
add_fdb_test(TEST_FILES BackupContainers.txt IGNORE)
add_fdb_test(TEST_FILES BandwidthThrottle.txt IGNORE)
add_fdb_test(TEST_FILES BigInsert.txt IGNORE)
add_fdb_test(TEST_FILES BlobStore.txt IGNORE)
add_fdb_test(TEST_FILES ConsistencyCheck.txt IGNORE)
add_fdb_test(TEST_FILES DDMetricsExclude.txt IGNORE)
add_fdb_test(TEST_FILES DataDistributionMetrics.txt IGNORE)
add_fdb_test(TEST_FILES DiskDurability.txt IGNORE)
add_fdb_test(TEST_FILES FileSystem.txt IGNORE)
add_fdb_test(TEST_FILES Happy.txt IGNORE)
add_fdb_test(TEST_FILES Mako.txt IGNORE)
add_fdb_test(TEST_FILES IncrementalDelete.txt IGNORE)
add_fdb_test(TEST_FILES KVStoreMemTest.txt UNIT IGNORE)
add_fdb_test(TEST_FILES KVStoreReadMostly.txt UNIT IGNORE)
add_fdb_test(TEST_FILES KVStoreTest.txt UNIT IGNORE)
add_fdb_test(TEST_FILES KVStoreTestRead.txt UNIT IGNORE)
add_fdb_test(TEST_FILES KVStoreTestWrite.txt UNIT IGNORE)
add_fdb_test(TEST_FILES KVStoreValueSize.txt UNIT IGNORE)
add_fdb_test(TEST_FILES LayerStatusMerge.txt IGNORE)
add_fdb_test(TEST_FILES ParallelRestoreApiCorrectnessAtomicRestore.txt IGNORE)
add_fdb_test(TEST_FILES PureNetwork.txt IGNORE)
add_fdb_test(TEST_FILES RRW2500.txt IGNORE)
add_fdb_test(TEST_FILES RandomRead.txt IGNORE)
add_fdb_test(TEST_FILES RandomReadWrite.txt IGNORE)
add_fdb_test(TEST_FILES ReadAbsent.txt IGNORE)
add_fdb_test(TEST_FILES ReadHalfAbsent.txt IGNORE)
add_fdb_test(TEST_FILES fast/ReadHotDetectionCorrectness.txt)
add_fdb_test(TEST_FILES RedwoodCorrectnessUnits.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodCorrectnessBTree.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodCorrectnessPager.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodCorrectness.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodPerfTests.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodPerfSet.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodPerfPrefixCompression.txt IGNORE)
add_fdb_test(TEST_FILES RedwoodPerfSequentialInsert.txt IGNORE)
add_fdb_test(TEST_FILES RocksDBTest.txt IGNORE)
add_fdb_test(TEST_FILES SampleNoSimAttrition.txt IGNORE)
if (NOT USE_UBSAN) # TODO re-enable in UBSAN after https://github.com/apple/foundationdb/issues/2410 is resolved
add_fdb_test(TEST_FILES SimpleExternalTest.txt)
endif()
add_fdb_test(TEST_FILES SlowTask.txt IGNORE)
add_fdb_test(TEST_FILES SpecificUnitTest.txt IGNORE)
add_fdb_test(TEST_FILES StorageMetricsSampleTests.txt IGNORE)
add_fdb_test(TEST_FILES StreamingWrite.txt IGNORE)
add_fdb_test(TEST_FILES ThreadSafety.txt IGNORE)
add_fdb_test(TEST_FILES Throttling.txt IGNORE)
add_fdb_test(TEST_FILES TraceEventMetrics.txt IGNORE)
add_fdb_test(TEST_FILES PopulateTPCC.txt IGNORE)
add_fdb_test(TEST_FILES TPCC.txt IGNORE)
add_fdb_test(TEST_FILES default.txt IGNORE)
add_fdb_test(TEST_FILES errors.txt IGNORE)
add_fdb_test(TEST_FILES fail.txt IGNORE)
add_fdb_test(TEST_FILES killall.txt IGNORE)
add_fdb_test(TEST_FILES latency.txt IGNORE)
add_fdb_test(TEST_FILES performance-fs.txt IGNORE)
add_fdb_test(TEST_FILES performance.txt IGNORE)
add_fdb_test(TEST_FILES ping.TXT IGNORE)
add_fdb_test(TEST_FILES pingServers.TXT IGNORE)
add_fdb_test(TEST_FILES pt.TXT IGNORE)
add_fdb_test(TEST_FILES randomSelector.txt IGNORE)
add_fdb_test(TEST_FILES selectorCorrectness.txt IGNORE)
add_fdb_test(TEST_FILES fast/AtomicBackupCorrectness.txt)
add_fdb_test(TEST_FILES fast/AtomicBackupToDBCorrectness.txt)
add_fdb_test(TEST_FILES fast/AtomicOps.txt)
add_fdb_test(TEST_FILES fast/AtomicOpsApiCorrectness.txt)
add_fdb_test(TEST_FILES fast/BackupCorrectness.txt)
add_fdb_test(TEST_FILES fast/BackupCorrectnessClean.txt)
add_fdb_test(TEST_FILES fast/BackupToDBCorrectness.txt)
add_fdb_test(TEST_FILES fast/BackupToDBCorrectnessClean.txt)
add_fdb_test(TEST_FILES fast/CloggedSideband.txt)
add_fdb_test(TEST_FILES fast/ConfigureLocked.txt)
add_fdb_test(TEST_FILES fast/ConstrainedRandomSelector.txt)
add_fdb_test(TEST_FILES fast/CycleAndLock.txt)
add_fdb_test(TEST_FILES fast/CycleTest.txt)
add_fdb_test(TEST_FILES fast/FuzzApiCorrectness.txt)
add_fdb_test(TEST_FILES fast/FuzzApiCorrectnessClean.txt)
add_fdb_test(TEST_FILES fast/IncrementTest.txt)
add_fdb_test(TEST_FILES fast/InventoryTestAlmostReadOnly.txt)
add_fdb_test(TEST_FILES fast/InventoryTestSomeWrites.txt)
add_fdb_test(TEST_FILES fast/KillRegionCycle.txt)
add_fdb_test(TEST_FILES fast/LocalRatekeeper.txt)
add_fdb_test(TEST_FILES fast/LongStackWriteDuringRead.txt)
add_fdb_test(TEST_FILES fast/LowLatency.txt)
add_fdb_test(TEST_FILES fast/MemoryLifetime.txt)
add_fdb_test(TEST_FILES fast/MoveKeysCycle.txt)
add_fdb_test(TEST_FILES fast/RandomSelector.txt)
add_fdb_test(TEST_FILES fast/RandomUnitTests.txt)
add_fdb_test(TEST_FILES fast/ReportConflictingKeys.txt)
add_fdb_test(TEST_FILES fast/SelectorCorrectness.txt)
add_fdb_test(TEST_FILES fast/Sideband.txt)
add_fdb_test(TEST_FILES fast/SidebandWithStatus.txt)
add_fdb_test(TEST_FILES fast/SpecialKeySpaceCorrectness.txt)
add_fdb_test(TEST_FILES fast/SwizzledRollbackSideband.txt)
add_fdb_test(TEST_FILES fast/SystemRebootTestCycle.txt)
add_fdb_test(TEST_FILES fast/TaskBucketCorrectness.txt)
add_fdb_test(TEST_FILES fast/TimeKeeperCorrectness.txt)
add_fdb_test(TEST_FILES fast/TxnStateStoreCycleTest.txt)
add_fdb_test(TEST_FILES fast/Unreadable.txt)
add_fdb_test(TEST_FILES fast/VersionStamp.txt)
add_fdb_test(TEST_FILES fast/Watches.txt)
add_fdb_test(TEST_FILES fast/WriteDuringRead.txt)
add_fdb_test(TEST_FILES fast/WriteDuringReadClean.txt)
add_fdb_test(TEST_FILES rare/CheckRelocation.txt)
add_fdb_test(TEST_FILES rare/ClogUnclog.txt)
add_fdb_test(TEST_FILES rare/CloggedCycleWithKills.txt)
add_fdb_test(TEST_FILES rare/ConflictRangeCheck.txt)
add_fdb_test(TEST_FILES rare/ConflictRangeRYOWCheck.txt)
add_fdb_test(TEST_FILES rare/CycleRollbackClogged.txt)
add_fdb_test(TEST_FILES rare/CycleWithKills.txt)
add_fdb_test(TEST_FILES rare/Downgrade.txt)
add_fdb_test(TEST_FILES rare/FuzzTest.txt)
add_fdb_test(TEST_FILES rare/InventoryTestHeavyWrites.txt)
add_fdb_test(TEST_FILES rare/LargeApiCorrectness.txt)
add_fdb_test(TEST_FILES rare/LargeApiCorrectnessStatus.txt)
add_fdb_test(TEST_FILES rare/RYWDisable.txt)
add_fdb_test(TEST_FILES rare/RandomReadWriteTest.txt)
add_fdb_test(TEST_FILES rare/SwizzledLargeApiCorrectness.txt)
add_fdb_test(TEST_FILES rare/RedwoodCorrectnessBTree.txt)
add_fdb_test(TEST_FILES rare/TransactionTagApiCorrectness.txt)
add_fdb_test(TEST_FILES rare/TransactionTagSwizzledApiCorrectness.txt)
add_fdb_test(
TEST_FILES restarting/from_7.0.0/ConfigureTestRestart-1.txt
restarting/from_7.0.0/ConfigureTestRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_5.0.0/CycleTestRestart-1.txt
restarting/from_5.0.0/CycleTestRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_5.0.0/StorefrontTestRestart-1.txt
restarting/from_5.0.0/StorefrontTestRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_6.2.29/SnapTestAttrition-1.txt
restarting/from_6.2.29/SnapTestAttrition-2.txt)
add_fdb_test(
TEST_FILES restarting/from_6.2.29/SnapTestSimpleRestart-1.txt
restarting/from_6.2.29/SnapTestSimpleRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_6.2.29/SnapTestRestart-1.txt
restarting/from_6.2.29/SnapTestRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_6.2.29/SnapCycleRestart-1.txt
restarting/from_6.2.29/SnapCycleRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_5.1.7/DrUpgradeRestart-1.txt
restarting/from_5.1.7/DrUpgradeRestart-2.txt)
add_fdb_test(
TEST_FILES restarting/from_5.2.0/ClientTransactionProfilingCorrectness-1.txt
restarting/from_5.2.0/ClientTransactionProfilingCorrectness-2.txt)
add_fdb_test(
TEST_FILES restarting/to_6.3.10/CycleTestRestart-1.txt
restarting/to_6.3.10/CycleTestRestart-2.txt)
add_fdb_test(TEST_FILES slow/ApiCorrectness.txt)
add_fdb_test(TEST_FILES slow/ApiCorrectnessAtomicRestore.txt)
add_fdb_test(TEST_FILES slow/ApiCorrectnessSwitchover.txt)
add_fdb_test(TEST_FILES slow/ClogWithRollbacks.txt)
add_fdb_test(TEST_FILES slow/CloggedCycleTest.txt)
add_fdb_test(TEST_FILES slow/CloggedStorefront.txt)
add_fdb_test(TEST_FILES slow/CommitBug.txt)
add_fdb_test(TEST_FILES slow/ConfigureTest.txt)
add_fdb_test(TEST_FILES slow/CycleRollbackPlain.txt)
add_fdb_test(TEST_FILES slow/DDBalanceAndRemove.txt)
add_fdb_test(TEST_FILES slow/DDBalanceAndRemoveStatus.txt)
add_fdb_test(TEST_FILES slow/DifferentClustersSameRV.txt)
add_fdb_test(TEST_FILES slow/FastTriggeredWatches.txt)
add_fdb_test(TEST_FILES slow/LowLatencyWithFailures.txt)
add_fdb_test(TEST_FILES slow/MoveKeysClean.txt)
add_fdb_test(TEST_FILES slow/MoveKeysSideband.txt)
add_fdb_test(TEST_FILES slow/RyowCorrectness.txt)
add_fdb_test(TEST_FILES slow/Serializability.txt)
add_fdb_test(TEST_FILES slow/SharedBackupCorrectness.txt)
add_fdb_test(TEST_FILES slow/SharedBackupToDBCorrectness.txt)
add_fdb_test(TEST_FILES slow/StorefrontTest.txt)
add_fdb_test(TEST_FILES slow/SwizzledApiCorrectness.txt)
add_fdb_test(TEST_FILES slow/SwizzledCycleTest.txt)
add_fdb_test(TEST_FILES slow/SwizzledDdBalance.txt)
add_fdb_test(TEST_FILES slow/SwizzledRollbackTimeLapse.txt)
add_fdb_test(TEST_FILES slow/SwizzledRollbackTimeLapseIncrement.txt)
add_fdb_test(TEST_FILES slow/VersionStampBackupToDB.txt)
add_fdb_test(TEST_FILES slow/VersionStampSwitchover.txt)
add_fdb_test(TEST_FILES slow/WriteDuringReadAtomicRestore.txt)
add_fdb_test(TEST_FILES slow/WriteDuringReadSwitchover.txt)
add_fdb_test(TEST_FILES slow/ddbalance.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreNewBackupCorrectnessAtomicOp.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreNewBackupCorrectnessCycle.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreNewBackupCorrectnessMultiCycles.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreNewBackupWriteDuringReadAtomicRestore.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreOldBackupCorrectnessAtomicOp.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreOldBackupCorrectnessCycle.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreOldBackupCorrectnessMultiCycles.txt)
add_fdb_test(TEST_FILES slow/ParallelRestoreOldBackupWriteDuringReadAtomicRestore.txt)
add_fdb_test(TEST_FILES ParallelRestoreOldBackupApiCorrectnessAtomicRestore.txt IGNORE)
# Note that status tests are not deterministic.
add_fdb_test(TEST_FILES status/invalid_proc_addresses.txt)
add_fdb_test(TEST_FILES status/local_6_machine_no_replicas_remain.txt)
add_fdb_test(TEST_FILES status/separate_1_of_3_coordinators_remain.txt)
add_fdb_test(TEST_FILES status/separate_2_of_3_coordinators_remain.txt)
add_fdb_test(TEST_FILES status/separate_cannot_write_cluster_file.txt)
add_fdb_test(TEST_FILES status/separate_idle.txt)
add_fdb_test(TEST_FILES status/separate_initializing.txt)
add_fdb_test(TEST_FILES status/separate_no_coordinators.txt)
add_fdb_test(TEST_FILES status/separate_no_database.txt)
add_fdb_test(TEST_FILES status/separate_no_servers.txt)
add_fdb_test(TEST_FILES status/separate_not_enough_servers.txt)
add_fdb_test(TEST_FILES status/single_process_too_many_config_params.txt)
verify_testing()
if (NOT OPEN_FOR_IDE AND NOT WIN32)
create_correctness_package()
if (USE_VALGRIND)
create_valgrind_correctness_package()
endif()
endif()
else()
message(WARNING "Python not found, won't configure ctest")
endif()