esp-idf-lib/devtools/spec/targets_spec.rb

Wed, 12 Apr 2023 16:23:02 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 12 Apr 2023 16:23:02 +0200
changeset 24
74609f70411e
parent 1
1c9894662795
permissions
-rw-r--r--

Reduced I2C master speed from 400 to 100 Khz. Hope to get power-on init for BMP280 more reliable. Added warnings for I2C devices that are missing. Some logmessages reduced to debug log messages. Added extra 10 mSec delays before read shunt voltage in the INA219 task. Removed and reduced log levels in the MQTT task. Show received data events. Remove WiFi total time debug logging, it's ok now.

# frozen_string_literal: true

require_relative "spec_helper"
require_relative "target_list"

file = File.join(File.dirname(__FILE__), "..", "targets.yml")

RSpec.describe "Target list metadata #{file}" do
  targets = TargetList.new(file)

  targets.all.each do |target|
    describe "Target #{target}" do
      subject { Target.new(target) }

      it "has a name" do
        expect(subject.name?).to be true
      end

      it "has non-empty name" do
        expect(subject.name).not_to be_empty
      end

      it "is a unique target in the list" do
        expect(targets.lookup(subject.name).length).to be 1
      end
    end
  end
end

mercurial