Cleanups and Github Actions ()

Cleanup some debugging output
    ensure crashdump directory exists on startup (issue )
    Create a Github Action to test PR requests.
This commit is contained in:
Justin Hammond 2020-01-22 14:58:48 +08:00 committed by GitHub
parent d33279b525
commit adb57e8dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 6 deletions
.github/workflows
qt-ozwdaemon

16
.github/workflows/prbuildtest.yml vendored Normal file
View file

@ -0,0 +1,16 @@
name: ozwdaemon Docker Image Build Test
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v1
with:
fetch-depth: 1 # shallow clone
- name: Build Docker Image
run: docker build . --file Docker/Dockerfile

View file

@ -94,7 +94,7 @@ void* context, bool succeeded) {
std::string response, error;
bool success = google_breakpad::HTTPUpload::SendRequest(url, parameters, files, proxy_host, proxy_userpasswd, "", &response, NULL, &error);
if (success)
if (success)
qWarning() << "Uploaded Crash minidump With ID: " << response.c_str();
else
qWarning() << "Failed to Upload Crash MiniDump in " << descriptor.path();
@ -288,10 +288,14 @@ int main(int argc, char *argv[])
if (bppath.isEmpty())
bppath = QStandardPaths::standardLocations(QStandardPaths::TempLocation).at(0);
qInfo() << "Using BreakPad - Crash Directory: " << bppath;
/* ensure path exists */
if (!QDir::exists(bppath)) {
QDir::mkpath(bppath);
}
google_breakpad::MinidumpDescriptor descriptor(bppath.toStdString());
google_breakpad::ExceptionHandler eh(descriptor, NULL, dumpCallback, static_cast<void *>(&daemon), true, -1);
#else
signal(SIGSEGV, backtrace);
#else
signal(SIGSEGV, backtrace);
signal(SIGABRT, backtrace);
#endif

View file

@ -118,7 +118,6 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
break;
}
case QTOZW_ValueIds::ValueIdTypes::List: {
qDebug() << "Processing List";
if (!msg["Value"].IsUint()) {
this->sendSimpleStatus(false, QString("Incorrect Field Type for Value: Not Integer: ").append(msg["Value"].GetType()));
qCWarning(ozwmcsv) << "Incorrect Field Type (Integer) for " << GetCommand() << ": Value: " << msg["Value"].GetType();
@ -132,9 +131,7 @@ bool MqttCommand_SetValue::processMessage(rapidjson::Document &msg) {
return false;
}
list.selectedItem = list.labels[index];
qDebug() << list.selectedItem;
data.setValue<QTOZW_ValueIDList>(list);
qDebug() << data;
break;
}
case QTOZW_ValueIds::ValueIdTypes::Raw: {