[nodejs-request] Add %check
Jamie Nguyen
jamielinux at fedoraproject.org
Tue May 28 06:48:59 UTC 2013
commit b7bff47c34809ed43ff8d7364a3c56e966199358
Author: Jamie Nguyen <j at jamielinux.com>
Date: Tue May 28 07:48:02 2013 +0100
Add %check
nodejs-request.spec | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/nodejs-request.spec b/nodejs-request.spec
index ef98fd3..4ec0be3 100644
--- a/nodejs-request.spec
+++ b/nodejs-request.spec
@@ -1,8 +1,10 @@
%{?nodejs_find_provides_and_requires}
+%global enable_tests 0
+
Name: nodejs-request
Version: 2.16.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Simplified HTTP request client
License: ASL 2.0
Group: Development/Libraries
@@ -13,6 +15,20 @@ BuildArch: noarch
BuildRequires: nodejs-devel
+%if 0%{?enable_tests}
+BuildRequires: npm(aws-sign)
+BuildRequires: npm(cookie-jar)
+BuildRequires: npm(forever-agent)
+BuildRequires: npm(form-data)
+BuildRequires: npm(hawk)
+BuildRequires: npm(json-stringify-safe)
+BuildRequires: npm(mime)
+BuildRequires: npm(node-uuid)
+BuildRequires: npm(oauth-sign)
+BuildRequires: npm(qs)
+BuildRequires: npm(tunnel-agent)
+%endif
+
%description
Request is designed to be the simplest way possible to make HTTP calls. It
supports HTTPS and follows redirects by default.
@@ -40,6 +56,15 @@ cp -pr *.js package.json %{buildroot}%{nodejs_sitelib}/request
%nodejs_symlink_deps
+
+%if 0%{?enable_tests}
+%check
+rm -f tests/test-tunnel.js
+ln -sf %{nodejs_sitelib} .
+%__nodejs tests/run.js
+%endif
+
+
%clean
rm -rf %{buildroot}
@@ -49,6 +74,9 @@ rm -rf %{buildroot}
%doc README.md LICENSE
%changelog
+* Tue May 28 2013 Jamie Nguyen <jamielinux at fedoraproject.org> - 2.16.6-4
+- add %%check
+
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 2.16.6-3
- add macro for EPEL6 dependency generation
More information about the scm-commits
mailing list