Commit 85d78c16d97d5b397489efa0fb8e15b5c1838a12
- Diff rendering mode:
- inline
- side by side
tests/jsloggertests.cpp
(7 / 4)
|   | |||
| 32 | 32 | #include <iostream> | |
| 33 | 33 | #include <fstream> | |
| 34 | 34 | ||
| 35 | #include <signal.h> | ||
| 36 | |||
| 35 | 37 | #include "core/base.h" | |
| 36 | 38 | #include "core/scripting/scriptobject.h" | |
| 37 | 39 | #include "core/scripting/jslogger.h" | |
| … | … | ||
| 183 | 183 | ||
| 184 | 184 | BOOST_CHECK(fs::exists(getTempDir() + "blalog")); | |
| 185 | 185 | ||
| 186 | fs::copy_file(getTempDir() + "blalog", "blalog1"); | ||
| 186 | fs::remove(getTempDir() + "blalog1"); | ||
| 187 | fs::copy_file(getTempDir() + "blalog", getTempDir() + "blalog1"); | ||
| 187 | 188 | fs::remove(getTempDir() + "blalog"); | |
| 188 | 189 | ||
| 189 | 190 | boost::shared_ptr<Event> pEvent(new Event("SIGNAL")); | |
| 190 | pEvent->setProperty("signum", "10"); | ||
| 191 | pEvent->setProperty("signum", intToString(SIGUSR1)); | ||
| 191 | 192 | queue.pushEvent(pEvent); | |
| 192 | 193 | ||
| 193 | sleepMS(1000); | ||
| 194 | sleepMS(3000); | ||
| 194 | 195 | ||
| 195 | 196 | { | |
| 196 | 197 | boost::scoped_ptr<ScriptContext> ctx(env->getContext()); | |
| … | … | ||
| 206 | 206 | ||
| 207 | 207 | queue.shutdown(); | |
| 208 | 208 | interpreter.terminate(); | |
| 209 | sleepMS(1500); | ||
| 209 | sleepMS(2500); | ||
| 210 | 210 | } | |
| 211 | 211 | ||
| 212 | 212 | BOOST_AUTO_TEST_SUITE_END() |

