Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1F1BF200C79 for ; Fri, 19 May 2017 16:44:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1DC28160BBE; Fri, 19 May 2017 14:44:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6CCBD160BD4 for ; Fri, 19 May 2017 16:44:08 +0200 (CEST) Received: (qmail 98635 invoked by uid 500); 19 May 2017 14:44:07 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 98626 invoked by uid 99); 19 May 2017 14:44:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 May 2017 14:44:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 13E96C05B0 for ; Fri, 19 May 2017 14:44:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id bx7P_0ZvvvnK for ; Fri, 19 May 2017 14:44:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 068615F20C for ; Fri, 19 May 2017 14:44:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 77215E05CE for ; Fri, 19 May 2017 14:44:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1E28221B57 for ; Fri, 19 May 2017 14:44:04 +0000 (UTC) Date: Fri, 19 May 2017 14:44:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MINIFI-290) Enable resource files to be loaded easily in unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 19 May 2017 14:44:09 -0000 [ https://issues.apache.org/jira/browse/MINIFI-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017479#comment-16017479 ] ASF GitHub Bot commented on MINIFI-290: --------------------------------------- Github user apiri commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/95#discussion_r117497192 --- Diff: libminifi/test/TestBase.h --- @@ -29,6 +29,13 @@ #include "core/Core.h" #include "properties/Configure.h" +/* Defining the root location of test resource files here in case it moves. * --- End diff -- Is this a relic of the original approach? Don't believe it's currently being used any more. > Enable resource files to be loaded easily in unit tests > ------------------------------------------------------- > > Key: MINIFI-290 > URL: https://issues.apache.org/jira/browse/MINIFI-290 > Project: Apache NiFi MiNiFi > Issue Type: Improvement > Components: C++, Testing > Reporter: Kevin Doran > Assignee: Kevin Doran > Priority: Minor > > As part of MINIFI-275, unit test cases were introduced that rely on YAML configuration input. Currently, the YAML is defined as string constants in the test cases (see [1]). > During peer review of MINIFI-275, it was suggested by [~phrocker] to move the YAML inputs to resource files and load them for the test. This ticket captures that improvement which will cleanup the unit test code by making the YAML input easier to locate and maintain. > As part of this, we need a clean way to set resource file locations in CMAKE so that they are easily available in ctest test cases. As the `test` target which invokes ctest is a builtin/standard CMAKE generated target, it is more limited in its configurability for items such as command line arguments [2] and environment variables (SET (CTEST_ENVIRONMENT ...) apparently does not work in CMakeLists.txt files, only when CMake is invoked via the CLI). This needs some more experimenting / digging into with our specific version of CMAKE before we decide on an approach for implementation. > [1] https://github.com/apache/nifi-minifi-cpp/pull/85 > [2] http://stackoverflow.com/a/16163137 -- This message was sent by Atlassian JIRA (v6.3.15#6346)