summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormwrock <matt@mattwrock.com>2020-12-08 16:46:04 -0800
committermwrock <matt@mattwrock.com>2020-12-08 16:46:04 -0800
commit7c5ebafdecea7a985564c81518a128644bdcb26b (patch)
treed0f3e258d9740a6ce244dfe8b766660f7e90b7f9
parentd2303a7aca2e4d0d9226cd7d81b9510d7e05d3f2 (diff)
downloadchef-windows.tar.gz
dfgdfgwindows
Signed-off-by: mwrock <matt@mattwrock.com>
-rw-r--r--omnibus/omnibus-test.ps116
-rw-r--r--test.rb8
2 files changed, 9 insertions, 15 deletions
diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1
index 99d7ffa9f0..b23239b0ac 100644
--- a/omnibus/omnibus-test.ps1
+++ b/omnibus/omnibus-test.ps1
@@ -60,19 +60,6 @@ $chefdir = gem which chef
$chefdir = Split-Path -Path "$chefdir" -Parent
$chefdir = Split-Path -Path "$chefdir" -Parent
-Copy-Item ./spec/unit/provider/systemd_unit_spec.rb $chefdir/spec/unit/provider/systemd_unit_spec.rb -force
-Copy-Item ./lib/chef/provider/systemd_unit.rb $chefdir/lib/chef/provider/systemd_unit.rb -force
-Copy-Item Gemfile $chefdir/Gemfile -force
-Set-Location -Path $chefdir
-
-Get-Location
-
-# ffi-yajl must run in c-extension mode for perf, so force it so we don't accidentally fall back to ffi
-$Env:FORCE_FFI_YAJL = "ext"
-
-# accept license
-$Env:CHEF_LICENSE = "accept-no-persist"
-
bundle
If ($lastexitcode -ne 0) { Exit $lastexitcode }
@@ -89,11 +76,10 @@ $env:Path = $p
# desktop heap exhaustion seems likely (https://docs.microsoft.com/en-us/archive/blogs/ntdebugging/desktop-heap-overview)
$exit = 0
-Get-ChildItem Env:
(Get-Counter '\Process(*)\% Processor Time').CounterSamples | Where-Object {$_.CookedValue -gt 5}
-bundle exec rspec ./spec/unit/provider/systemd_unit_spec.rb:140
+bundle exec ruby test.rb
If ($lastexitcode -ne 0) { $exit = 1 }
Exit $exit
diff --git a/test.rb b/test.rb
new file mode 100644
index 0000000000..c03fff8991
--- /dev/null
+++ b/test.rb
@@ -0,0 +1,8 @@
+require "mixlib/shellout"
+require "ruby-prof"
+RubyProf.start
+c = Mixlib::ShellOut.new(["false", "--system", "is-enabled", "sysstat-collect\\x2d.timer"])
+c.run_command
+result = RubyProf.stop
+printer = RubyProf::FlatPrinter.new(result)
+printer.print(STDOUT)