Skip to content

Commit

Permalink
Clean dead code & Fix Compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM committed Dec 27, 2023
1 parent 49c694c commit f68c3c5
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 131 deletions.
3 changes: 3 additions & 0 deletions tea/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ install(
${CMAKE_CURRENT_SOURCE_DIR}/include/sapi.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tea)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/testing/fixture.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tea/testing)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/testing/catch2.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tea/testing)

Expand Down
1 change: 0 additions & 1 deletion tea/benchmarks/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions tea/benchmarks/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <benchmark/benchmark.h>
#include <include/testing/fixture.hpp>
#include <Zend/zend_exceptions.h>
//#include "memory_manager.h"

static void BM_TeaSapiSpinup(benchmark::State& state) {
TeaTestCaseFixture fixture;
Expand All @@ -17,39 +16,6 @@ static void BM_TeaSapiSpinup(benchmark::State& state) {
}
BENCHMARK(BM_TeaSapiSpinup);

/*
static void BM_TeaSapiRshutdown(benchmark::State& state) {
TeaTestCaseFixture fixture;
fixture.tea_sapi_spinup();
for (auto _ : state) {
fixture.tea_sapi_rshutdown();
}
fixture.tea_sapi_mshutdown();
fixture.tea_sapi_sshutdown();
}
BENCHMARK(BM_TeaSapiRshutdown);
static void BM_TeaSapiMshutdown(benchmark::State& state) {
TeaTestCaseFixture fixture;
fixture.tea_sapi_spinup();
fixture.tea_sapi_rshutdown();
for (auto _ : state) {
fixture.tea_sapi_mshutdown();
}
fixture.tea_sapi_sshutdown();
}
BENCHMARK(BM_TeaSapiMshutdown);
static void BM_TeaSapiSshutdown(benchmark::State& state) {
TeaTestCaseFixture fixture;
fixture.tea_sapi_spinup();
for (auto _ : state) {
fixture.tea_sapi_sshutdown();
}
}
BENCHMARK(BM_TeaSapiSshutdown);
*/

static void BM_TeaSapiSpindown(benchmark::State& state) {
TeaTestCaseFixture fixture;
for (auto _ : state) {
Expand All @@ -63,12 +29,3 @@ static void BM_TeaSapiSpindown(benchmark::State& state) {
BENCHMARK(BM_TeaSapiSpindown);

BENCHMARK_MAIN();
/*
int main(int argc, char** argv) {
::benchmark::RegisterMemoryManager(mm.get());
::benchmark::Initialize(&argc, argv);
::benchmark::RunSpecifiedBenchmarks();
::benchmark::RegisterMemoryManager(nullptr);
return 0;
}
*/
85 changes: 0 additions & 85 deletions tea/benchmarks/memory_manager.h

This file was deleted.

2 changes: 1 addition & 1 deletion tea/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if test "$PHP_TEA" != "no"; then
AC_DEFINE(HAVE_TEA, 1, [ ])

PHP_TEA_INCLUDE="sapi/tea/include"
PHP_TEA_HEADERS="common.h error.h exceptions.h extension.h frame.h sapi.h testing/catch2.hpp"
PHP_TEA_HEADERS="common.h error.h exceptions.h extension.h frame.h sapi.h testing/fixture.hpp testing/catch2.hpp"
PHP_TEA_CFLAGS="-I${abs_srcdir}/${PHP_TEA_INCLUDE}"
PHP_TEA_FILES="src/error.c src/exceptions.c src/frame.c src/io.c src/ini.c src/extension.c src/sapi.c"

Expand Down
2 changes: 1 addition & 1 deletion tea/include/testing/catch2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Code or cases tested with bailout will fail if code does not bail
* Code or cases tested without bailout will fail if code bails
*/
#include <include/testing/fixture.hpp>
#include "fixture.hpp"

#include <catch2/catch.hpp>

Expand Down

0 comments on commit f68c3c5

Please sign in to comment.