From 92b68a1df7db4834127f6e90454860c803f8d862 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 2 Mar 2007 05:45:58 +0000 Subject: [PATCH] signal tests --- .../hyperic/sigar/test/SigarTestRunner.java | 1 + .../org/hyperic/sigar/test/TestSignal.java | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 bindings/java/src/org/hyperic/sigar/test/TestSignal.java diff --git a/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java b/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java index 70d3a6ce..cd0e2a9f 100644 --- a/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java +++ b/bindings/java/src/org/hyperic/sigar/test/SigarTestRunner.java @@ -65,6 +65,7 @@ public class SigarTestRunner extends SigarCommandBase { TestProcStat.class, TestProcTime.class, TestResourceLimit.class, + TestSignal.class, TestSwap.class, TestThreadCpu.class, TestUptime.class, diff --git a/bindings/java/src/org/hyperic/sigar/test/TestSignal.java b/bindings/java/src/org/hyperic/sigar/test/TestSignal.java new file mode 100644 index 00000000..d3e0c809 --- /dev/null +++ b/bindings/java/src/org/hyperic/sigar/test/TestSignal.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) [2004, 2005, 2006], Hyperic, Inc. + * This file is part of SIGAR. + * + * SIGAR is free software; you can redistribute it and/or modify + * it under the terms version 2 of the GNU General Public License as + * published by the Free Software Foundation. This program is distributed + * in the hope that 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA. + */ + +package org.hyperic.sigar.test; + +import org.hyperic.sigar.Sigar; +import org.hyperic.sigar.SigarNotImplementedException; + +public class TestSignal extends SigarTestCase { + + public TestSignal(String name) { + super(name); + } + + public void testCreate() throws Exception { + String[] signals = { + "HUP", "INT", "KILL", "QUIT", + "TERM", "USR1", "USR2" + }; + + for (int i=0; i