aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
AgeCommit message (Collapse)AuthorFilesLines
2018-02-09Module to manage pip packagesRodolfo Alonso Hernandez1-0/+2
This new module provides methods to manage Python PIP packages from a URL, from a local directory or from a build PIP package. The implemented commands are: - Install package. - Remove package. - List all installed packages in the system. JIRA: YARDSTICK-910 Change-Id: I8f7d1b77c0c384b801cc6f5e67d8b45ce7c6bfdf Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-11pylint: try to change formatting for Jenkins againRoss Brattain1-1/+1
looks like we have to add var to tox passenv Change-Id: Iba2da2123ae531e026897308769aa832c7eb6d04 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-17Move test scripts to tools/Emma Foley1-3/+3
Move the scripts that tox uses for running tests to the tools/ directory: * run_tests.sh -> tools/run_tests.sh * tests/ci/cover.{sh,awk} -> tools/ JIRA: YARDSTICK-837 Change-Id: I817c9e5f58c06b45f1de3f369318f4bb24168677 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-17tox: Split tests into separate tox environmentsEmma Foley1-5/+20
* Add argument parsing to run_tests.sh so tests can be selected * Define tox environments for: * Coverage * Unit tests * Functional tests * for py27 and py3 * Add environments to default env * Behaviour is the same when the tests are run * Updates the py27 environment config, and adds a py3 config. * Commands from testenv are moved to py27 * py3 env uses the same commands, but runs with python3 Change-Id: I22f17c0103101f01ec268b1de9d146780ae67a6d JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-17Tox: add a pep8 targetEmma Foley1-13/+9
Adds a pep8, pep8-full targets to tox: * pep8 target: runs pylint on the changed files * pep8-full target: runs pylint on whole repo Adds scripts to run pylint: * stored in tools/ Documentation: changeed the command for running tests (run_tests.sh -> tox). This runs the same set of tests as before. JIRA: YARDSTICK-832 Change-Id: I652da87723682d958f3fcbc2eb4cd88422636a3b Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-10Check requirements against OpenStack requirementsRodolfo Alonso Hernandez1-1/+7
Added a new tox environment to check the project requirements against the OpenStack requirements. The openstack/requirements branch used will depends on Yardstick release development. At this point, Yardstick F release must be compliant with OpenStack Pike release. Change-Id: I77a4cfa4f99674176c3f5711dc1b6787bb400ecf Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-08-08NSB updateDeepak S1-0/+6
Refactored main NSB VNF classes accroding to class diagram https://wiki.opnfv.org/display/yardstick/NSB+class+diagram All the SampleVNFs have been separated and placed under the SampleVNF class. Added AutoConnectSSH to automatically create SSH conneciton on demand. Added VnfdHelper class to wrap the VNFD dictionary in prepartion for class-based modeling. Extracted DpdkVnfSetupEnvHelper for DPDK based VNF setup. Extracted Stats and other client config to ResourceHelper Had to replace dict_key_flatten with deepgetitem due to Python 2.7 Jinja2 infinite recursion. Change-Id: Ia8840e9c44cdbdf39aab6b02e6d2176b31937dc9 Signed-off-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-06-21increase line length to 99Ross Brattain1-0/+1
When line length is 79 I have to spend too much time manually wrapping my code into unreadable junk I can't use expressive tuple unpacking and I start shortening variables and other bad tricks to decrease the line length. We have too many levels of indent to manage with 79 class: def: if: for: etc. Change-Id: Ib2ce9cf887f9880c46815822c8d0e1a7806e53ca Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-07Pass environment variables of proxy to toxDeepak S1-0/+1
When a development environment is under a proxy, tox is failed even if environment variables of the proxy are set. Change-Id: Ia6f8f2a1f215fc4c861d7dbc7a61dcd6973fb3cb Signed-off-by: Deepak S <deepak.s@linux.intel.com>
2017-01-19basic tox.ini for python 2.7 and python 3 unittestsRoss Brattain1-0/+22
Nothing fancy for now, just call run_tests.sh If we want to expand we could add pep8, coverage to tox. See dovetail tox.ini for example Change-Id: I8b5897779ed9622dd1b38612cb393fc214ec6300 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
ound-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 *  arch/arm/mach-socfpga/pm.c
 *
 * Copyright (C) 2014-2015 Altera Corporation. All rights reserved.
 *
 * with code from pm-imx6.c
 * Copyright 2011-2014 Freescale Semiconductor, Inc.
 * Copyright 2011 Linaro Ltd.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <linux/bitops.h>
#include <linux/genalloc.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/of_platform.h>
#include <linux/suspend.h>
#include <asm/suspend.h>
#include <asm/fncpy.h>
#include "core.h"

/* Pointer to function copied to ocram */
static u32 (*socfpga_sdram_self_refresh_in_ocram)(u32 sdr_base);

static int socfpga_setup_ocram_self_refresh(void)
{
	struct platform_device *pdev;
	phys_addr_t ocram_pbase;
	struct device_node *np;
	struct gen_pool *ocram_pool;
	unsigned long ocram_base;
	void __iomem *suspend_ocram_base;
	int ret = 0;

	np = of_find_compatible_node(NULL, NULL, "mmio-sram");
	if (!np) {
		pr_err("%s: Unable to find mmio-sram in dtb\n", __func__);
		return -ENODEV;
	}

	pdev = of_find_device_by_node(np);
	if (!pdev) {
		pr_warn("%s: failed to find ocram device!\n", __func__);
		ret = -ENODEV;
		goto put_node;
	}

	ocram_pool = gen_pool_get(&pdev->dev, NULL);
	if (!ocram_pool) {
		pr_warn("%s: ocram pool unavailable!\n", __func__);
		ret = -ENODEV;
		goto put_node;
	}

	ocram_base = gen_pool_alloc(ocram_pool, socfpga_sdram_self_refresh_sz);
	if (!ocram_base) {
		pr_warn("%s: unable to alloc ocram!\n", __func__);
		ret = -ENOMEM;
		goto put_node;
	}

	ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);

	suspend_ocram_base = __arm_ioremap_exec(ocram_pbase,
						socfpga_sdram_self_refresh_sz,
						false);
	if (!suspend_ocram_base) {
		pr_warn("%s: __arm_ioremap_exec failed!\n", __func__);
		ret = -ENOMEM;
		goto put_node;
	}

	/* Copy the code that puts DDR in self refresh to ocram */
	socfpga_sdram_self_refresh_in_ocram =
		(void *)fncpy(suspend_ocram_base,
			      &socfpga_sdram_self_refresh,
			      socfpga_sdram_self_refresh_sz);

	WARN(!socfpga_sdram_self_refresh_in_ocram,
	     "could not copy function to ocram");
	if (!socfpga_sdram_self_refresh_in_ocram)
		ret = -EFAULT;

put_node:
	of_node_put(np);

	return ret;
}

static int socfpga_pm_suspend(unsigned long arg)
{
	u32 ret;

	if (!sdr_ctl_base_addr)
		return -EFAULT;

	ret = socfpga_sdram_self_refresh_in_ocram((u32)sdr_ctl_base_addr);

	pr_debug("%s self-refresh loops request=%d exit=%d\n", __func__,
		 ret & 0xffff, (ret >> 16) & 0xffff);

	return 0;
}

static int socfpga_pm_enter(suspend_state_t state)
{
	switch (state) {
	case PM_SUSPEND_STANDBY:
	case PM_SUSPEND_MEM:
		outer_disable();
		cpu_suspend(0, socfpga_pm_suspend);
		outer_resume();
		break;
	default:
		return -EINVAL;
	}
	return 0;
}

static const struct platform_suspend_ops socfpga_pm_ops = {
	.valid	= suspend_valid_only_mem,
	.enter	= socfpga_pm_enter,
};

static int __init socfpga_pm_init(void)
{
	int ret;

	ret = socfpga_setup_ocram_self_refresh();
	if (ret)
		return ret;

	suspend_set_ops(&socfpga_pm_ops);
	pr_info("SoCFPGA initialized for DDR self-refresh during suspend.\n");

	return 0;
}
arch_initcall(socfpga_pm_init);