source: src/testing/private/webserverrunner.cpp@ 915dc18

Last change on this file since 915dc18 was 915dc18, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago
  • Working c++ library webserviceclient class, which allows to register a station
    • Added tests for the webserviceclient class
    • Improved build system
    • Fixed some errors in Webservice Location.php and WebserviceApi.php
  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[915dc18]1/*
2 Copyright (C) 2012 - 2013 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 MA 02110-1301 USA.
18*/
19
20
21#include "webserverrunner.h"
22#include "moc_webserverrunner.cpp"
23
24#include "sitestingconfig.h"
25#include "webserverprocess.h"
26
27#include <QProcess>
28#include <QDebug>
29
30WebserverRunner::WebserverRunner()
31 : QObject()
32{
33
34}
35
36WebserverRunner::~WebserverRunner()
37{
38
39}
40
41void WebserverRunner::start()
42{
43 QStringList arguments;
44 arguments << QString("-S %1:%2").arg(QString(WEBSERVICE_SERVER_HOST)).arg(QString(WEBSERVICE_SERVER_PORT));
45 arguments << QString("-t %1").arg(WebserverProcess::appendSlashToUrl(QString(WEBSERVICE_SERVER_DOCROOT)));
46
47 qDebug() << QString("%1: Executing %2 %3").arg(metaObject()->className()).arg(QString(PHP_EXECUTABLE)).arg(arguments.join(" "));
48// _webserverProcess->setStandardInputFile("/tmp/test-input");
49// _webserverProcess->setStandardErrorFile("/tmp/test-error.log");
50// _webserverProcess->setStandardOutputFile("/tmp/test-output.log");
51 // must be executed in own thread, QProcess::start isn't working
52 QProcess::execute(QString(PHP_EXECUTABLE) +" "+ arguments.join(" "));
53}
54
Note: See TracBrowser for help on using the repository browser.